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

  • Home
  • SEARCH
  • 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 7910841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:01:19+00:00 2026-06-03T13:01:19+00:00

Here is my code http://jsfiddle.net/mihaene/7bdkB/ I want a div to slide in, as soon

  • 0

Here is my code
http://jsfiddle.net/mihaene/7bdkB/

I want a div to slide in, as soon as I scroll down a certain amount of pixel.
It works, but very, very delayed (like 5seconds).
What’s the problem?

Any suggestion would be very much appreciated.

  • 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-06-03T13:01:20+00:00Added an answer on June 3, 2026 at 1:01 pm

    Hi I think the problem is your else block. jQuery is then starting the animation which takes ~300 ms.

    var $test2 = $(".test2");
    $(window).scroll(function () {
        if ($(this).scrollTop() > 100) {
            $test2.stop().animate({left: "200px"}, 300);
        } else {
            $test2.stop().animate({left: "-90px"}, 300);
        }
    });
    

    So just use the stop() method of jQuery to stop those animations.

    On a sidenote: maybe you should think of different if / else statements in order not to get an animation (or stop / restart) with every scrolling event as other suggested.

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

Sidebar

Related Questions

Here is my code: http://jsfiddle.net/XYbmE/75/ I want the div#first to stay blue if the
here is the code: http://jsfiddle.net/duNHJ/2/ Basically there is an animations every div so when
I'm using simple jcarousel here is ther code: http://jsfiddle.net/w6fLA/ I'm trying to show div
Please find the code at http://jsfiddle.net/wlogeshwaran/NGL8P/4/ Here i want to make the 'hi' ,
I put my example code here http://jsfiddle.net/8epWm/2/ I want to enable zClip on an
I want to get the content of multiple Spans. Here is my code: http://jsfiddle.net/4XumV/
I found this count down timer code here http://jsfiddle.net/QH6X8/ I would like to make
You can play with my code here: http://jsfiddle.net/gqQnd/ Basically I want to have a
Here's my code: http://jsfiddle.net/ZspZT/ As you can see from the example, the fourth div
Here is some code: http://jsfiddle.net/T65E3/3/ I want to get an attr when i know

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.