$ is a valid character in JS identifiers; it does not matter. $ (obj) wraps an obj object with a jQuery object and decorates obj with a lot of extra steps.
These are legal Javascript variable names:
$a=1; a$$$=1; $a=1;
The $ function is an alias for jQuery if you are doing something like:
your HTML:
<img src='logo.png' id='site_logo'/>
your js:
var logo = $('#site_logo'); logo.fadeOut();
The fadeOut method does not belong to the img element, but to the jQuery wrapper.
Alcides Queiroz Aguiar
source share