Closed codedcontainer closed 6 years ago
When trying to require the 2.0 version externally I get the following error: "cannot read property 'extend' of undefined" > win.icheck = $.extend(defaults, win.icheck); When trying to require using NPM install I get the following error: "cannot read property 'fn' of undefined" > $.fn[_iCheck] = function(options, fire) {...
Found a solution to this problem:
1.) Install with NPM
2.) Add with require('icheck');
3.) Make sure that you using the latest 2.0+ not 3.0+ version of Jquery.
4.) Include Jquery in icheck file in /node_modules/icheck/icheck.js
(function($){ var $ = require('jquery'); ...}
Does not work as a common js module even though it is listed on NPM.