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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:44:54+00:00 2026-05-24T17:44:54+00:00

What should be a few simple lines of jQuery doesn’t seem to be working

  • 0

What should be a few simple lines of jQuery doesn’t seem to be working properly in Internet Explorer. Works fine in Firefox. When you scroll within 200px of the bottom of the viewport, the fixed position div should “stick” to the page as you scroll past.

Here is a jsFiddle example of the problem:
jsFiddle example of fixed position div problem

In Firefox, the example works correctly. When the scroll position is 200 px from the bottom of the document height, the fixed position div becomes position absolute with a Top: property of the height of the page minus the height of the viewport minus the height of the element. In other words, it “sticks” to where it is when you continue scrolling past it.

In Internet explorer, the div simply just stays at the bottom and the jquery if condition is never met.

  • 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-24T17:44:55+00:00Added an answer on May 24, 2026 at 5:44 pm

    Try using

    var till = $('body').height()-800;
    

    …rather than

    var till = $('html').height()-800;
    

    I’m guessing the height of the HTML element itself isn’t well-defined in IE. You also seem to be using the “this” of the document ready function to grab the window; you should use window instead. Additionally, I think the positioning maths for the “after you’ve gone past the limit” in your example was a bit wrong.

    Also, once you’ve been through your limit, your div ends up with both a “top” and a “bottom” value set in its CSS, which probably confuses the browser. I’ve added a reset (setting the “bottom” value to “auto” when the “top” value gets set.)

    Try this: http://jsfiddle.net/gothick/HVhLw/32/ ; it seems to work in Firefox and IE for me.

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

Sidebar

Related Questions

I have simple win service, that executes few tasks periodically. How should I pass
From the should be simple, but... files: Trying to get started with jQuery UI.
A simple tool to store and display texts longer than a few lines. The
I have a few links that should all open in the same window or
I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing
What are few commonly used Hidden Lists and Objects that we should know of
I am creating few pages (including login page) which should only be accessible by
I have a few questions about Core Location. 1) Should the user refuse permission
I was working in L2E with 3 simple tables, whose purposes a fairly straightforward:
I've a very simple function that should read a txt file and return all

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.