javascript - How to slide div, checked the input checkbox -
i trying slide div in jquery when checked check box. not working
how can this?
<!doctype html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $(".filter").prop('checked')(function(){ $("p").slidetoggle(); }); }); </script> </head> <body> <input type="checkbox" name="checkd" class="filter"> <p>slider div</p> </body> </html>
$(".filter").on('change', function () { $("p").slidetoggle(); });
Comments
Post a Comment