dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Animate elements within a Slider

  1. #1
    Join Date
    Aug 2012
    Posts
    2

    Animate elements within a Slider

    I am wondering how to animate elements within a slider. I am trying to achieve this effect: www.shoretel.com/

    I thought it may have been flash, but it's not. Can this be accomplished using JavaScript/JQuery?

  2. #2
    Join Date
    Sep 2011
    Location
    Bristol, England, United Kingdom
    Posts
    192
    If you want to write an image slider from scratch, it's not that hard. Take a look at using the setInterval() and setTimeout() functions when moving your <div> elements.

    You can use JavaScript to update the left or right CSS position of an element in a loop. There would be no actual declaration of a loop, but your setInterval() function would be called each n milliseconds until your <div> has reached a given position, at which point you would clear the interval.

    If you have a set number of images that you know you're going to use, then you don't even need to worry about writing a generic slider that can work with any number of images, you can just predefine the positions at which to stop/start.

  3. #3
    Join Date
    Aug 2012
    Posts
    2
    Great idea! That worked just fine. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles