check uncheck All checkboxes with another single checkbox use jquery

后端 未结 10 545
长情又很酷
长情又很酷 2020-12-03 05:14

I use jquery-1.9.1.js In my html page, it works well for the first time.

just like http://jsfiddle.net/pzCcE/1/

Can somebody help me to improve it?

10条回答
  •  暖寄归人
    2020-12-03 06:01

    the fastest way. and save some lines

       $(".ulPymnt input[type=checkbox]").each(function(){                
           $(this).prop("checked", !$(this).prop("checked"))                
       })
    

提交回复
热议问题