On 1/16/07, Daniel McBrearty <[EMAIL PROTECTED]> wrote:

(I think that's right ... now I mention it I'm not
quite sure if $ is an object reference or an operator ... )


$ is an alias to a function named "jQuery", which returns a jQuery object.
If you're familiar with Object Oriented Programming, you can think of $(...)
and jQuery(...) as sort of like constructor functions. Actually, now that I
think about it

var $foo = jQuery("#foo");

is just a shortcut for

var $foo = new jQuery("#foo");

From the jQuery source:

var jQuery = function(a,c) {
   // If the context is global, return a new object
   if ( window == this )
       return new jQuery(a,c);
// rest of "jQuery" function.....

Typical usage of jQuery(...) will trigger the code on line 4

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to