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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:06:39+00:00 2026-05-23T00:06:39+00:00

I have a div box (called flux) with a variable amount of content inside.

  • 0

I have a div box (called flux) with a variable amount of content inside.
This divbox has overflow set to auto.

Now, what I am trying to do, is, when the use scroll to the bottom of this DIV-box, load more content into the page, I know how to do this (load the content) but I don’t know how to detect when the user has scrolled to the bottom of the div tag?
If I wanted to do it for the entire page, I’d take .scrollTop and subtract that from .height.

But I can’t seem to do that here?

I’ve tried taking .scrollTop from flux, and then wrapping all the content inside a div called inner, but if I take the innerHeight of flux it returns 564px (the div is set to 500 as height) and the height of ‘innner’ it returns 1064, and the scrolltop, when at the bottom of the div says 564.

What can I do?

  • 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-23T00:06:40+00:00Added an answer on May 23, 2026 at 12:06 am

    There are some properties/methods you can use:

    $().scrollTop()//how much has been scrolled
    $().innerHeight()// inner height of the element
    DOMElement.scrollHeight//height of the content of the element
    

    So you can take the sum of the first two properties, and when it equals to the last property, you’ve reached the end:

    jQuery(function($) {
        $('#flux').on('scroll', function() {
            if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
                alert('end reached');
            }
        })
    });
    

    http://jsfiddle.net/doktormolle/w7X9N/

    Edit: I’ve updated ‘bind’ to ‘on’ as per:

    As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document.

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

Sidebar

Related Questions

I have this div inside a repeater, where i set the class, onmouseover and
I have a div with overflow:hidden , inside which I show a phone number
I have a div which has style properties as border-top, left, right, bottom set.
I have an input box that as you type displays a div called suggestions
i have div's wrapped under div's my html code is. <div id=content-row> <div id=left-box>
I have a status message box (div box) positioned at the bottom of a
I have a div and an iframe on the page the div has z-index:
I have a div with two nested divs inside, the (float:left) one is the
I have a Div with five float divs inside: var div=document.createElement(div); div.className=cssDivNino; var divFolio=document.createElement(div);
I have a div tag styled through CSS. I set the padding to 10px

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.