1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

need a quick answer please. (disable scroll bar for 'x' amount of seconds)

Discussion in 'Web Design & Development' started by bikerbcs, Jan 12, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. bikerbcs

    bikerbcs Thread Starter

    Joined:
    Oct 10, 2005
    Messages:
    103
    i want to be able to disable scrolling on my website for a specific amount of seconds, is there a javascript code I can use? thanks. im not very good with html and web development and I need this.
     
  2. DrP

    DrP

    Joined:
    Jul 23, 2005
    Messages:
    739
    jQuery:

    Code:
    $("body").css("overflow", "hidden");
    var showBars = function() {
        $("body").css("overflow", "auto");
    }
    
    // show the scroll bars after 3 seconds
    setTimeout(showBars, 3000);
    You'll need jQuery, if you don't know...
     
  3. lordsmurf

    lordsmurf

    Joined:
    Apr 23, 2009
    Messages:
    1,156
    Is your intention to piss off users so they never come back?
    That's the net effect it will have.
     
  4. DrP

    DrP

    Joined:
    Jul 23, 2005
    Messages:
    739
    Gulp! I thought you were complaining I wasn't being helpful, at first, but then worked out what you mean! Don't you think, if used well, this might work to focus visitors on an advert? Actually, yeah, you're right - terrible idea!
     
  5. Ainsley

    Ainsley

    Joined:
    Jan 17, 2011
    Messages:
    10
    Not if you have a big page and want to allow some if not most too load, set the timer to one second, this wouldn't 'piss' off users in my opinion.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/974176

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice