Jquery chkbox show hidden content? -


i want create multiplay chkbox, when select show hidden div, work one, how count automatically, if have more chkbox?

$(document).ready(function(){      //hide div w/id    $("#extra").css("display","none");      // add onclick handler checkbox w/id checkme    $("#checkme").click(function(){      // if checked     if ($("#checkme").is(":checked"))     {         //show hidden div         $("#extra").show("fast");     }     else     {         //otherwise, hide         $("#extra").hide("fast");     }   });  });   <form action="" method="get"> <input name="" type="checkbox" value="" id="checkme"> <span> $1 + </span> </form>   <div id="extra" style="width:10px; height:10px; background-color:#000;"> 123 </div> 

try defining <div id="container"> , using

$("#container :checkbox:not(:checked)").size()  

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -