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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:25:14+00:00 2026-06-03T01:25:14+00:00

I am working on a scrolling page design and I have the following Javascript

  • 0

I am working on a scrolling page design and I have the following Javascript to hide and show a dialog box:

        if(window.pageYOffset >= 300){

            $('#m1').fadeIn('slow');

    }

    if(document.documentElement.scrollTop >=300){

        $('#m1').fadeIn('slow');

    }

This works great in Chrome,FF, IE9+

However, in IE8,7 it only kind of works. It shows and hides the element properly but the delay between when it evaluates the scroll position and when it hides the element is horrendous. Also, there is no fade, it just happens.

I am wondering if its just a problem with IE8 that I need to deal with or if there is a way for me to achieve a reactive, clean fade with IE8.

  • 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-03T01:25:16+00:00Added an answer on June 3, 2026 at 1:25 am

    pageYOffset and pageXOffset are not supported in IE8 and before, try this function:

    // Return the current scrollbar offsets as the x and y properties of an object
    function getScrollOffsets() {
    
        // This works for all browsers except IE versions 8 and before
        if ( window.pageXOffset != null ) 
           return {
               x: window.pageXOffset, 
               y: window.pageYOffset
           };
    
        // For browsers in Standards mode
        var doc = window.document;
        if ( document.compatMode === "CSS1Compat" ) {
            return {
                x: doc.documentElement.scrollLeft, 
                y: doc.documentElement.scrollTop
            };
        }
    
        // For browsers in Quirks mode
        return { 
            x: doc.body.scrollLeft, 
            y: doc.body.scrollTop 
        }; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html page. Why does alert not working when I scroll
I am working on Project where I have JQuery 1-Page Horizontal scrolling website using
I have a vertical scrolling website (lots of in-page links). I also have a
I have telerik grid on my page. But it working not correctly. Problem: when
I have been battling like crazy with a javascript that allows for infinite scrolling
In a page I'm working on I have html container for a div height
I am working on a comment voting system. I have a page profile_new.php?id=194 That
I am working on a single page horizontal scrolling site that is 10,000 px
Working on an irc client in Adobe AIR in JavaScript, and thinking about logging.
Working on a page with multiple sections. at the very top there is a

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.