show div on checkbox check


/ Published in: jQuery
Save to your folder(s)

show div on checkbox check


Copy this code and paste it in your HTML
  1. $('.check').change(function () {
  2. if ($(this).attr("checked"))
  3. {
  4.  
  5. $('.mydiv').fadeIn();
  6. return;
  7. }
  8. $('.mydiv').fadeOut();
  9. });

URL: http://jsfiddle.net/addyosmani/ND428/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.