I am using jquery 1.11.1 and this is my code:
$(\"#rowchkall\").change(function(){ if($(this).is(\':checked\')){ $(\"input:checkbox[class=rowchk]
Use .prop() instead of .attr()
$(this).prop('checked', true); //true to check else false uncheck
Your code can be simplified as
$("#rowchkall").change(function () { $("input:checkbox.rowchk").prop('checked',this.checked); });
A Good Read .prop() vs .attr()