JQuery: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
JQuery is a JavaScript popular framework. It smooths over many of the difficulties that traditionally made JavaScript hard to work with and supports / encourages a unique style of coding driven by CSS-selector based "queries". JQuery code can be surprisingly compact.
JQuery is a JavaScript popular framework. It smooths over many of the difficulties that traditionally made JavaScript hard to work with and supports / encourages a unique style of coding driven by CSS-selector based "queries". JQuery code can be surprisingly compact. By default jQuery is accessed via the globally defined function "$" (though "jQuery" should also work).


For example, to hide all the links (in anchor tags) on a page, you could simply write:
For example, to hide all the links (in anchor tags) on a page, you could simply write:

Revision as of 15:45, 26 July 2009

JQuery is a JavaScript popular framework. It smooths over many of the difficulties that traditionally made JavaScript hard to work with and supports / encourages a unique style of coding driven by CSS-selector based "queries". JQuery code can be surprisingly compact. By default jQuery is accessed via the globally defined function "$" (though "jQuery" should also work).

For example, to hide all the links (in anchor tags) on a page, you could simply write:

$("a").hide();

Or to make all paragraphs of class "quote" have a pink background, and a larger text size:

$("p.quote").css({background:  "pink", font-size: "larger"});

http://jquery.org