Home arrow JavaScript arrow Toggling CSS Properties with the GX JavaScript Animation Framework
JAVASCRIPT

Toggling CSS Properties with the GX JavaScript Animation Framework


In this ninth episode of the series, I provide you with some comprehensive examples that show how to toggle different properties of a sample div by using the core “gx()” method of the GX library. As with many tasks the GX JavaScript animation framework can be made to perform, toggling animations is a very simple process.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
February 09, 2010
TABLE OF CONTENTS:
  1. · Toggling CSS Properties with the GX JavaScript Animation Framework
  2. · Toggling the width of a div in a single step
  3. · Dynamically expanding and contracting an HTML element
  4. · Toggling the opacity of an HTML element

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Toggling CSS Properties with the GX JavaScript Animation Framework
(Page 1 of 4 )

If you develop websites frequently, then you’ll surely have noticed that client-side frameworks are very popular these days. Whether you need to create clean div-based web page layouts, or simply want to polish the visual presentation of your carefully-crafted (X)HTML documents, there is probably a framework out there that will do the hard work for you without a single complaint.

Logically, this trend can also be seen in the JavaScript-based animation field. There is now a plethora of frameworks that permits developers to implement eye-catching visual effects on web pages in a simple fashion, and in a truly unobtrusive way.

Among the numerous JavaScript-driven animation frameworks available nowadays for free use, there’s one that might be especially appealing to you. It boasts a powerful set of features and a flat learning curve. Yes, as you may have guessed, I’m talking about GX, a library that will let you animate any HTML element in a snap. What’s more, if you’re a strong advocate of jQuery, then you’ll find that using GX is a breeze, as the library relies on many of the native methods bundled with jQuery for performing its “magic.”

To illustrate how useful GX can be for making web pages more dynamic, in previous articles of this series I covered the capabilities of the library for animating different properties of a simple div, either individually or simultaneously. Aside from showing how to perform these basic animations, I also discussed how to cancel, pause and resume a specific effect, thus demonstrating that the library provides users with a decent level of control over the way that animations are performed.

It’s fair to say, though, that GX has many more features that deserve a closer analysis. This includes its ability to toggle values assigned to properties of HTML elements. As this can be very convenient for simplifying the execution of more complex animations, in the next few lines I’ll be coding some easy-to-follow examples that will help you grasp the logic behind creating toggling animations.

Ready to learn the full details? Then let’s get started!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- 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
- Dynamic jQuery Styling

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 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials