3 ms·
Cool stuff! This reminds me a lot of jQuery Boilerplate: https://github.com/jquery-boilerplate/jquery-boilerplate/blob/master/src/jquery.boilerplate.js https://
by rdebeasi 13y ago
Cool stuff! This reminds me a lot of jQuery Boilerplate: https://github.com/jquery-boilerplate/jquery-boilerplate/blob/master/src/jquery.boilerplate.js https://github.com/jquery-boilerplate/jquery-boilerplate/blo...
Personally, I find the "that" variable to be a little confusing. A developer looking at the code might wonder whether "that" is the plugin, a DOM element, or something else. To make the code a little clearer, you could use something like "elem" to represent the element on which the plugin has been called, and "plugin" to represent the plugin itself.
Happy coding!
- kolodny 13y agoThat's a good point. I've updated the post to use `elem` and `$elem` Thanks