jquery - prevent already disabled checkbox from being checked when click on checkAll -


below code using check check boxes.

jquery("#checkall").on('click',function() { // bulk checked             var status = this.checked;             jquery(".selectrow").each( function() {                 jquery(this).prop("checked",status);             });         }); 

but disabled checkbox checked when click on checkall link. how stop disabled checkbox being checked when click on checkall link? appreciated.

you there. use not(":disabled") filter current code , leave out checkboxes disabled.

jquery(".selectrow").not(":disabled")... 

see question looks similar: jquery selector checked checkboxes not disabled


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -