Home arrow JavaScript arrow Moving Divs Diagonally with the GX JavaScript Animation Framework
JAVASCRIPT

Moving Divs Diagonally with the GX JavaScript Animation Framework


In this sixth part of a series, I explain how to use the GX JavaScript animation library for animating at the same time the “left” and “top” properties of a simple div. This process is fairly straightforward, meaning that you shouldn’t have major problems implementing it on your own web pages.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 3
January 28, 2010
TABLE OF CONTENTS:
  1. · Moving Divs Diagonally with the GX JavaScript Animation Framework
  2. · Review: moving a div horizontally and vertically
  3. · Moving a div diagonally on screen
  4. · Altering the top, left and background-color properties of a div

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Moving Divs Diagonally with the GX JavaScript Animation Framework
(Page 1 of 4 )

Unquestionably, jQuery is by far the preferred tool of numerous web designers, especially when adding dynamic behavior to elements of a web page. Three reasons explain this: first, the library’s learning curve is extremely flat; second, it comes bundled with tons of handy features; and last but not least, it does its business in an unobtrusive manner.

Picking up a JavaScript library can be a relatively simple decision. Things can be more complicated, though, when a certain project requires the implementation of complex animations that are out of the scope of the native jQuery’s capabilities. Fortunately, the solution to this drama (at least for those like me who are reluctant to stray away from jQuery's comfortable API) is only around the corner.

Among the plethora of plug-ins and add-ons that now exist for the library, there’s one that's particularly appealing for its thorough animation features. Yes, as this article’s title suggests, I’m talking about GX, a powerful framework created by Riccardo Degni, which permits developers to create a great variety of animations on web pages without having to leave the friendly environment of jQuery.

Naturally, if you just came across this tutorial, this framework may be new to you. But if you’ve already had the chance to read all of the previous parts of this series, then you already have a solid background in how to use the functionality of GX for animating different properties of a target HTML element.

I left off the last part discussing how to individually alter the “top” and “left” properties of a single div. This process allows you to move it vertically and horizontally across the screen. Admittedly, that’s useful as long as you don’t need to modify the properties in question at the same time. But, does that mean that GX can’t do something as simple as that?

Relax; the library can do that and much more, actually. However, in this sixth chapter of the series I’ll be discussing how to manipulate simultaneously the “top” and “left” properties of a div, so you'll quickly learn the underlying logic of this animation process. Ready to start reading? Then jump right in!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials