Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The zepto plugin requires zepto.data #33

Closed
shinuza opened this issue May 16, 2013 · 2 comments
Closed

The zepto plugin requires zepto.data #33

shinuza opened this issue May 16, 2013 · 2 comments

Comments

@shinuza
Copy link
Contributor

shinuza commented May 16, 2013

Call to $.data() without Zepto.data doesn't work with objects.

Thus the call:

      return input.data(_iCheck).o[state + (regular ? '' : 'Class')];

Will evaluate to

      return [object Object].o[state + (regular ? '' : 'Class')];

And property o of that string is obviously undefined, which triggers and error like Uncaught TypeError: Cannot read property 'uncheckedCheckboxClass' of undefined

Please update the doc to mention the need for the Zepto.data addon

Code is found at: https://github.com/fronteed/iCheck/blob/master/zepto.icheck.js#L389

@drgullin
Copy link
Owner

There's a if (input.data(_iCheck)) statement before this code, which should do the job.

iCheck requires a full-blown data() method https://github.com/madrobby/zepto/blob/master/src/data.js#files

Zepto docs are updated https://github.com/fronteed/iCheck#initialize

drgullin pushed a commit that referenced this issue May 17, 2013
@shinuza
Copy link
Contributor Author

shinuza commented May 17, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants