QUESTION:  I am looking for an article that explains the conceptual
relationship between jQuery and Javascript.  Can anyone point me in
the proper direction?

BACKGROUND:  In my quest to understand why some things in my webpage
work while others do not I found the following, very useful article
about the YAHOO object, the creation of namespaces, and how to control
the number of global variables -- namely, through the creation of
modules that are based on a single object.  jQuery appears to be just
such an object, on the one hand, but something entirely different on
the other.

Many days ago when I first started using jQuery someone provided me
with a formula for creating jQuery methods.  A formula that I have
dutifully applied over and over again, but I now believe to excess.
The formula was the following:

(function($) {$.fn.METHOD_NAME = function() {FUNCTION_CODE}})(jQuery);

In my young mind there are important similarities between this
expression and that outlined in the very useful article written by
Eric Miraglia (see below) for the creation of a YAHOO namespace and a
program module.  I would now like to make the connection, if there is
one, and am asking where is the best place to find out.  Surely this
connection would help me understand the relationship between jQuery
and Javascript.

I remember someone in this forum also having said "jQuery IS
Javascript".  I believe them, but am obviously having difficulty
understanding in what way.

USEFUL ARTICLE:  http://yuiblog.com/blog/2007/06/12/module-pattern/

Roddy


Reply via email to