The accepted answer was fundamentally flawed, it has since been deleted. The correct answer is:
function scrolled(e) {
if (myDiv.offsetHeight + myDiv.scrollTop >= myDiv.scrollHeight) {
scrolledToBottom(e);
}
}
Tested this in Firefox, Chrome and Opera. It works.
More Related Contents:
- Scroll Function working in reverse order [closed]
- How to scroll an HTML page to a given anchor
- Trigger event when user scroll to specific element – with jQuery
- Keep overflow div scrolled to bottom unless user scrolls up
- How to scroll to top of page with JavaScript/jQuery?
- prevent Scroll bubbling from element to window
- How to do a horizontal scroll on mouse wheel scroll?
- How to load images dynamically (or lazily) when users scrolls them into view
- How can I differentiate a manual scroll (via mousewheel/scrollbar) from a Javascript/jQuery scroll?
- jQuery jump or scroll to certain position, div or target on the page from button onclick [duplicate]
- Scrolling Overflowed DIVs with JavaScript
- Load ajax when scroll reaches 80%
- Get one element title and add this to another div in jquery
- Get the longest text in HTML document using Jquery or javascript
- Hide/Show image on one click [closed]
- How to move an element into another element?
- How to prevent a click on a ‘#’ link from jumping to top of page?
- How to calculate the XPath position of an element using Javascript?
- How to disable scroll without hiding it?
- Uncaught Error: SECURITY_ERR: DOM Exception 18 when I try to set a cookie
- jQuery: Get selected element tag name
- Save a pre element as PDF with CSS
- Center flex item in container, when surrounded by other flex items
- jQuery load content when scroll to bottom-100px of page, multiple events fired
- Onclick reload the div only
- jQuery: How to listen for DOM changes?
- submit event does not fire if submit initiated programmatically
- How can I remove wrapper (parent element) without removing the child?
- minimise the code since I am using the same code only the content in p tags changes and component AccordionHeader header changes
- Content of html page changed by jQuery but “View Source” don’t reflect the changes