|
|
|
|
|
by Stratoscope
4093 days ago
|
|
It's very kind of John to mention my first jQuery plugin in the notes. Unfortunately, it was not a very good plugin and probably set a bad precedent. Like so many new jQuery developers, I went "Chaining? Whoa. Chain all the things!" So I attached the plugin to $.fn, not thinking about the fact that what the plugin did had very little to do with the current element selection. I may have been the first to make this mistake, but at least I wasn't the last. :-) Perhaps I redeemed myself by coming up with the idea to use $.prototype for plugin methods instead of copying the method references by looping through $.fn (we kept $.fn as an alias of $.prototype for compatibility). So a $(...) call became a lot faster. |
|
Then you get things like $("#target").MakeBobsFancyBoxWidget()