Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6653499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:16:37+00:00 2026-05-26T01:16:37+00:00

I have a sliding div and several buttons that will trigger the animation at

  • 0

I have a sliding div and several buttons that will trigger the animation at different speeds (by using varying values for duration).

The buttons are something like:
[Left x2][Left x1][Left x0.5][Right x0.5][Right x1][Right x2]

My code is currently like:

  //leftVal is set based on where the div is currently placed
  //timeLeft is set based on which button is "on hover"  

  $('#content-holder').animate({       
    "left": leftVal        
  }, {queue:false, duration:(timeLeft), easing:"quadEaseOut"});       

This is fine in Chrome but on other browsers like IE this results in a jumpy animation and you can visibly see the scrolling div stopping for a split second before continuing at the new speed.

I’ve got a feeling that the best way to achieve a variable speed scroll would be to directly affect the duration of the animation without killing it and starting a new one, but I’m not sure if this is possible. Any tips?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:16:38+00:00Added an answer on May 26, 2026 at 1:16 am

    I think you’re looking for this:

    $('#content-holder').stop().animate({       
    "left": leftVal
    }, {queue:false, duration:(timeLeft), easing:"quadEaseOut"});
    

    .stop() kills the queue, and after that you start your animation. (http://api.jquery.com/stop/)

    I usually use it to avoid my website tripping out when you spam multiple buttons.

    Please note that because you are using easing that the animation wont run smooth. When you call the new animation the easing will “play” from the start as well.

    However, reading the description if your problem I guess that’s what you want.

    Please let me know if it helped!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the below where trigger open is a sliding div that exposes the
sliding div using javascript i have three div with some content. i need the
I have a sliding div on my page which is using jQuery, I'd like
I have a script that will slide a div up from the bottom of
Using a jQuery effect, I have a layer that has a collection of HTML
I have a menu: <div id=menu> <ul=navigation> <li><a href=>Home</a></li> </ul> </div> With the sliding
I am using the following sliding div script: http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html Currently, the slidetoggle function is
I have a div that is deliberately smaller than its content (I'm making a
I have a sliding panel and on the last element I want the animation
I have a script that I am developing that creates a sliding button type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.