i am having a problem in my code of hiding and displaying the row again but it isn’t working. when i comment the code of 2nd loop then it woks perfectly fine but when i add 2nd loop then again trouble. Here is my 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
with