Signs of a poorly written jQuery plugin
remysharp.com
remysharp.com
$(this).each(...)
Knowing that I can use:
this.each()
will allow me to simplify things a bit.
Maybe as a sign-post that the person doesn't really understand JQuery plugins very well…
I probably wouldn't immediately toss out a plugin that exhibited one or more of these signs, but I would take it as a sign that I ought to do a slightly more thorough skimming of the code before using.
It's a shame that the jQuery plugin directory doesn't make separating the good from the bad much easier.
return $(this).each(fn);
I'm actually surprised that the JS engines don't do this kind of optimization automatically.Also I ignored what you were saying because your use of a temporary placeholder in your first sentence was a red flag, indicative of poor writing. Better would have been "This article demonstrates clearly why I hate abuse of the "this" keyword in jQuery", eliminating the extra "it" altogether.