I have a table that has checkbox column and I added this :
<th>
    <input type="checkbox" id="selectAll">
</th>
and here's my jQuery function :
jQuery(document).ready(function() {
   jQuery('#selectAll').click(function(){ 
   jQuery("input[type='checkbox']").attr('checked', jQuery('#selectAll').is(':checked')); }) 
});
It works fine at the first check but when i uncheck and try to check again it doesn't work! Any reason why it doesn't work? Thanks
 
     
     
     
     
    