Book Section
-----
TY JavaScript 3rd Ed.
Teach Yourself JS 1.5
Teach Yourself DHTML
Teach Yourself JS 1.3
LLWW: JavaScript

General Section
-----
Discussion Forum
Articles / Tips
JavaScript Links
About the Author
Privacy Policy
Contact Me



Other Sites
-----
Website Workshop
JavaScript Weblog

JavaScript Workshop Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
JQuery

 
Post new topic   Reply to topic    JSWorkshop Forum Index -> Articles
View previous topic :: View next topic  
Author Message
sohnee
Senior Member
Senior Member


Joined: 17 Jul 2002
Posts: 1117
Location: UK

PostPosted: Tue Jan 29, 2008 6:26 am    Post subject: JQuery Reply with quote

As you may have spotted on these very pages, I've been using JavaScript for a long time. More specifically, I've been using RAW JavaScript for a long time and now, it's going to stop.

Of course, this dramatisation of real life if just designed to hook you into what I'm about to say, but I've done it because what I'm about to say is really important.

There are quite a few JavaScript frameworks making their way into general use and I've spent a few weeks trying them out. What a framework does is extend, simplify and wrap something and that's exactly what I have here in front of me.

JQuery has a series of really simple commands built in that animate, manipulate and otherwise fiddle around with your page in ways that would have taken ages to write from scratch. Not only is it really simple, but it's really powerful. If used correctly, it will deprecate nicely and work in all browsers. Anyone who's implemented an opacity filter (and had to write line after line of conditions based on browser and version) will appreciate the simplicity offered by the framework.

On top of that, rather than peppering your code with event-code (onload, onmouseover, onclick, onsomethingelse!) - the support for adding events dynamically will be a breath of fresh air.

Anyway, let's look at an example:

Here are the instructions on how to fade out an object using JavaScript:

http://brainerror.net/scripts/javascript/blendtrans/

Here are the instructions to do the same using JQuery:

http://docs.jquery.com/Effects/fadeOut#speedcallback

We've instantly gone from some 30 lines of code, to 1 line of code!

Of course, it can do a whole lot more for you too; handle ajax requests, change styles, manage events and (best of all) you can add your own JavaScript into JQuery event handlers to do whatever the heck you like!

Check it out now at: http://jquery.com/
_________________
I work for: http://www.the-mag.me.uk/
Unsigned and Independent Music Magazine
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    JSWorkshop Forum Index -> Articles All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
(c) 1997-2002 Starling Technologies and Michael Moncur. Portions (c) Sams Publishing.