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(); }); 

jsfiddle demo


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -