Monday, January 2, 2012

Lesson 1: jQuery animations are simultaneous

Hi folks! Inspired by jQuery tutorials on the web, I started porting some of them to CoffeeScript, which is, of course, a great source of fun too. I left coffeescript uncompiled so you could easier browse the page code.
Here goes a lesson from Wayfarer's animation tutorial, mostly unchanged.

All animations you start run simultaneously by default, unless you choose to stack them.



Animation in this example is very smooth, because the elements being animated are simple. Be careful, quality is likely to degrade for complex elements.

jQuery.animate function calls usual form:
jQuery(selector).animate( properties, [ duration ], [ easing ], [ callback ] ) with properties in [ brackets ] being optional. Using coffeescript you can drop some of the syntax if you like:

Source code links:

Ok, that was too simple, we surely want more fun. Get to the next lesson!

technorati token D6DWZM9N6BXZ  

3 comments :

  1. Thanks for putting this together, it is the best resource I have found on the subject.

    ReplyDelete

  2. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this.
    School website design uk

    ReplyDelete