|
|
|
|
|
by buckwilson
6006 days ago
|
|
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. |
|
$myDiv = $('myDiv');
They'll simply use $('myDiv') all over the place which will be horrible.