All of the interesting technological, artistic or just plain fun subjects I'd investigate if I had an infinite number of lifetimes. In other words, a dumping ground...

Monday 22 October 2007

Javascript library - jQuery

http://jquery.com/
jQuery is a new type of JavaScript library.


jQuery is a fast, concise, JavaScript Library that simplifies how you
traverse HTML documents, handle events, perform animations, and add Ajax
interactions to your web pages. jQuery is designed to change the way that
you write JavaScript.


"You start with 10 lines of jQuery that would have been 20 lines of
tedious DOM JavaScript. By the time you are done it's down to two or
three lines and it couldn't get any shorter unless it read your
mind." - Dave Methvin

What does jQuery code look like? The quick and dirty:


$("p.surprise").addClass("ohmy").show("slow");


Congratulations! You just ran a snippet of jQuery code. Wasn't that easy?
There's lots of example code throughout the documentation on this site. Be
sure to give all the code a test run, to see what happens.


The above code snippet looks for all paragraphs that have a class of
'surprise', adds the class 'ohmy' to them, then slowly reveals them. Click
the 'Run' button to see it in action!

No comments:

tim's shared items

Blog Archive

Add to Google Reader or Homepage