i having problem in code of hiding , displaying row again isn't working. when comment code of 2nd loop woks fine when add 2nd loop again trouble. here code.
<script> $("#btnclick").click(function(){ $("form input[type=checkbox]:not(:checked)").each( function(){ var checkboxid = $(this).attr('id'); //alert("checkboxid"+" "+checkboxid); $("table td").each(function(){ if(checkboxid==$(this).attr('id')){ //alert($(this).attr('id')); $(this).hide(); } }); }); $("form input[type=checkbox][checked]").each( function(){ var checkboxid = $(this).attr('id'); //alert("checkboxid"+" "+checkboxid); $("table td").each(function(){ if(checkboxid==$(this).attr('id')){ //alert($(this).attr('id')); $(this).show(); } }); }); }); </script>
thanks in advance.
replace this
$("form input[type=checkbox][checked]").each(
with
$("form input[type=checkbox]:checked").each(
Comments
Post a Comment