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 9051183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:50:45+00:00 2026-06-16T12:50:45+00:00

Ok with this.. $(window).scroll(function() { $(‘.slides_layover’).removeClass(‘showing_layover’); $(‘#slides_effect’).show(); }); I can tell when someone is

  • 0

Ok with this..

$(window).scroll(function()
{
    $('.slides_layover').removeClass('showing_layover');
    $('#slides_effect').show();
});

I can tell when someone is scrolling from what I understand. So with that I am trying to figure out how to catch when someone has stopped. From the above example you can see I am removing a class from a set of elements while the scrolling is occurring. However, I want to put that class back on when the user stops scrolling.

The reason for this is I am intent on having a layover show while the page is scrolling to give the page a special effect I am attempting to work on. But the one class I am trying to remove while scrolling conflicts with that effect as its a transparency effect to some nature.

  • 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-16T12:50:46+00:00Added an answer on June 16, 2026 at 12:50 pm
    $(window).scroll(function() {
        clearTimeout($.data(this, 'scrollTimer'));
        $.data(this, 'scrollTimer', setTimeout(function() {
            // do something
            console.log("Haven't scrolled in 250ms!");
        }, 250));
    });
    

    Update

    I wrote an extension to enhance jQuery’s default on-event-handler. It attaches an event handler function for one or more events to the selected elements and calls the handler function if the event was not triggered for a given interval. This is useful if you want to fire a callback only after a delay, like the resize event, or such.

    It is important to check the github-repo for updates!

    https://github.com/yckart/jquery.unevent.js

    ;(function ($) {
        var on = $.fn.on, timer;
        $.fn.on = function () {
            var args = Array.apply(null, arguments);
            var last = args[args.length - 1];
    
            if (isNaN(last) || (last === 1 && args.pop())) return on.apply(this, args);
    
            var delay = args.pop();
            var fn = args.pop();
    
            args.push(function () {
                var self = this, params = arguments;
                clearTimeout(timer);
                timer = setTimeout(function () {
                    fn.apply(self, params);
                }, delay);
            });
    
            return on.apply(this, args);
        };
    }(this.jQuery || this.Zepto));
    

    Use it like any other on or bind-event handler, except that you can pass an extra parameter as a last:

    $(window).on('scroll', function(e) {
        console.log(e.type + '-event was 250ms not triggered');
    }, 250);
    

    http://yckart.github.com/jquery.unevent.js/

    (this demo uses resize instead of scroll, but who cares?!)

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

Sidebar

Related Questions

I have tried this code: $(function(){ $('.media-in').bind('mouseover',function(){ $(this).children('.media-options').show(); }); $('.media-in').bind('mouseout',function(){ $(this).children('.media-options').hide(); }); $(window).on('scroll',function(){ $('.media-in').unbind('mouseover');
How do I detect horizontal scrolling with jQuery? This will get all scrolls: $(window).scroll(function
$(window).scroll(function(e){ if($(this).scrollTop()>=400) $('#jtop').show('slow'); if($(this).scrollTop()<400) if($('#jtop').width()) $('#jtop').hide('slow'); }); I'm using the function to determine if
I have made this infinitely scrolling script, but I can't rebind the window scroll
I've found this code $(window).scroll(function(){ $('#header').css({ //Why this 15, because in the CSS, we
I have this function working <script type=text/javascript> $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() -
$(window).scroll(function() { $('#myElement').css('top', $(this).scrollTop() + px); }); works great, but what if I want
I have this code: $(window).scroll(function () { if ($(window).scrollTop() >= $(document).height() - $(window).height() -
I have this jquery function: $(window).scroll(function () { if ($(window).scrollTop() > offset.top) { $(#sidebar).css(marginTop,
I'm looking for something to this effect: $(window).scroll(function(event){ if (/* magic code*/ ){ //

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.