JavaScript
  Home arrow JavaScript arrow Moving Elements Vertically and Horizontall...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Moving Elements Vertically and Horizontally with the GX JavaScript Animation Framework
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2010-01-27

    Table of Contents:
  • Moving Elements Vertically and Horizontally with the GX JavaScript Animation Framework
  • Review: creating bouncing parallel animations with GX
  • Moving elements across the screen
  • Moving divs up and down

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Moving Elements Vertically and Horizontally with the GX JavaScript Animation Framework


    (Page 1 of 4 )

    In this fifth part of a series on the GX animation library, I develop a couple of basic examples that demonstrate how to move a div either vertically or horizontally. You'll see that it's a simple process of manipulating the div’s “top” and “left” properties.

    Encapsulated behind a friendly and intuitive API, the GX framework is a full-featured JavaScript library that will let you create all sorts of animation effects on your web pages without having to sacrifice the cleanliness of your structural markup. You won't even need to appeal to more complex time-lined applications like Adobe Flash and Swift 3D.

    Since GX uses the core engine of jQuery to do its business, you’ll find that performing animations with it is very similar to working with jQuery’s native methods. That makes GX even easier to learn. 

    Of course, at this point I assume that all of these features are familiar to you, since in previous tutorials of this series I explained how to use the GX library for creating single and parallel animations via its handy “gx()” method. As the library’s workhorse, this method is extremely customizable and permits you to achieve relatively complex effects, such as simultaneously modifying multiple properties of a target HTML element and implementing bouncing animations in a simple manner.

    All of the examples developed so far have shown how to animate in different ways the width, height and background color of a trivial div. This is useful, but doesn’t tell the full story of the actual functionality that GX packages behind the scenes. Therefore, in the course of this fifth episode of the series I’ll be discussing how to utilize the library for animating individually the “top” and “left” coordinates (or properties) of a given HTML element, thus covering a broader range of use cases.

    Now, it’s time to leave the boring theory behind start writing some functional code samples. Let’s go!

    More JavaScript Articles
    More By Alejandro Gervasio


       · This fifth chapter of a series shows how to use the GX library for moving a div...
     

    JAVASCRIPT ARTICLES

    - Using jQuery to Preload Images with CSS and ...
    - Using Client-Side Scripting to Preload Image...
    - Removing Non-Semantic Markup when Preloading...
    - Using the Display CSS Property to Preload Im...
    - Preloading Images with CSS and JavaScript
    - Scaling and Moving Web Page Elements with th...
    - Fading, Hiding and Sliding HTML Elements wit...
    - Toggling CSS Properties with the GX JavaScri...
    - Cancel, Queue and Pause Animations with the ...
    - Producing Elastic Effects with the GX JavaSc...
    - Moving Divs Diagonally with the GX JavaScrip...
    - Moving Elements Vertically and Horizontally ...
    - Making Bouncing Effects in Parallel with the...
    - Creating Bouncing Effects with the GX JavaSc...
    - Manipulating Background Colors with the GX J...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 8 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek