In JavaScript, $ and _ are treated just like letters. For example:
var a$b_c = 1;
alert( a$b_c ); // alerts '1'
jQuery just happens to use $ as a function name - and as Giovanni mentioned
the same function is also named jQuery.
In addition to the $ function, you'll often see variables beginning with $
in jQuery code. This is just a naming convention to indicate a variable that
contains a jQuery object:
var $foo = $('.foo');
$foo.show(); // or some other jQuery method
If you'll be using the same selector repeatedly, it pays to store the jQuery
object in a variable so it doesn't have to run the selector code every time
you use it.
-Mike
On Mon, Oct 5, 2009 at 9:09 PM, ibnusarnan <[email protected]> wrote:
>
> hello alll, Im a newbie in jquery,
> I just one know and angered with jquery, why and how the jquery code
> is:
>
> $.ready
>
> using dollar sign, anyone can explain me about this (using dollar sign
> in javascript) and please give me an sample example of this for
> clearest explanation.
>
>
> thanks,
>
> IBS
>