drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.38k stars 1.62k forks source link

Plugin not defined when file lazy loaded #121

Closed codewhisper closed 10 years ago

codewhisper commented 10 years ago

I'm using iCheck with Drupal and if I try to load the iCheck lib with an Ajax call I get the error, that the funciton "_icheck" does not exists.

The solve the issue, I simply moved the plugin definition "$.fn[_icheck] = function(options, fire) {}" above the binding "$(_doc).on".

Regards,

Jakob

drgullin commented 10 years ago

Please provide a test link, I'll try to fix that.

Do you use 1.x or 2.x version? All the things should be tested using the 2.x version.

codewhisper commented 10 years ago

Hi,

I'm sorry but I'm not able to setup a test environment right now. (Simply do not have the time). I will try sonish.

Anyhow, I'm using the 2.x version.

Regards

drgullin commented 10 years ago

Thanks, fixed in https://github.com/fronteed/iCheck/commit/982905edf9388c7982f937e27d7c270a7bdf7a7a