AndyJarrett Code. Develop. Manage.

jQuery, it really is simple

I've started playing around with jQuery along with the rest of the world it seems and all I can say is WOW. Working with it has been straight forwards and simple.

There's a couple of things out of the box that I like about it, but mainly the fact it comes as one .js file so doesn't matter what affect you want its there. In regards to it's simplness here some quickexamples to get going:

First you need the jQuery.js file. This comes in 3 flavours, while i'm still testing I'm using option 2

  1. Download jQuery 1.2.1 (14kb, Minified and Gzipped) Great for production use.
  2. Download jQuery 1.2.1 (77kb, Uncompressed) Great for testing, learning and development.
  3. Download jQuery 1.2.1 (26kb, Packed) For those that can't Gzip their JavaScript.

Adding jQuery to your HTML is an easy one-liner

This is an example bit of code that fades out a link (click the link to see it in action) $(this).fadeOut('slow')
This is what the full code looks like:$(this).fadeOut('slow');return false;
How simple is that?

To fade in a link you just use $(this).fadeIn('slow'). Whats even better about jQuery is that you can join these effects together on a actions; "chainability". So upon one click you can fadeOut() and fadeIn() a link by joining the effects. $(this).fadeOut('slow').fadeIn('slow');return false;$(this).fadeOut('slow');return false;

As I carry on my journey I'll hopefully blog more this.

In the meantime has anyone read the book Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques. Is it worth buying or can you find everything online?

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee.
Your support keeps this site running and the coffee brewing! ☕️