News for hackers. Stuff that matters.
Re:JQuery Code Smells by buckwilson on Thursday January 07, 2010 @01:19PM (#1037632)
I think you kind of missed something. The $ by itself in a variable name doesn't do anything. It's simply a notation to keep your DOM elements (and other variables / objects) separated from your jQuery wrapped elements.

$myDiv = $('#myDiv');

Now I know every time that $myDiv is already wrapped in jQ and I won't make the mistake of wrapping it again $($myDiv) in my code.

Re:JQuery Code Smells by axod on Thursday January 07, 2010 @01:26PM (#1037652)
Yes, I know. My point is that most people won't know/bother doing

$myDiv = $('myDiv');

They'll simply use $('myDiv') all over the place which will be horrible.

Re:JQuery Code Smells by noodle on Thursday January 07, 2010 @03:29PM (#1037962)
so, the complaint is that people who don't understand jquery use it incorrectly/inefficiently?
Re:JQuery Code Smells by axod on Thursday January 07, 2010 @05:05PM (#1038129)
meh. If you like it use it. Personally I find that code ugly, inefficient and error prone.