tomekwojcik / jQuery-Custom-Checkboxes

Dead simple custom checkboxes jQuery plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checking for checked

oplahcinski opened this issue · comments

Instead of:

if (_this.attr('checked') == true) 

the code should be:

if (_this.attr('checked') )

because in chrome checked attr is equal to the string 'checked'. Doing the 2nd meathod will allow more flexability for different browsers.

Hi,
this one looks more like to be caused by jQuery API changes. $().attr('checked') used to return true or false but now it returns 'checked' or undefined. I was planning to rewrite the plugin to support newer jQuery features but now it looks like I have to. Thanks for pointing this out.

Hi,
this issue was fixed in pull request from @nutrixtech.

happy to help :)