$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
This comment has been minimized.
This comment has been minimized.
Excelent! |
This comment has been minimized.
This comment has been minimized.
like it :) |
This comment has been minimized.
This comment has been minimized.
Work like a boss |
This comment has been minimized.
This comment has been minimized.
thanks but this command don't work for me. |
This comment has been minimized.
This comment has been minimized.
Works inversely i.e when I scroll to the top of page only then it fires. Probably my system scroll is inverse? |
This comment has been minimized.
This comment has been minimized.
@amigoow, I also had the same issue. I realized that my html, head and title elements were in caps. After changing them to lower cases, everything work perfect. |
This comment has been minimized.
This comment has been minimized.
This works too
|
This comment has been minimized.
This comment has been minimized.
great commit !! thx |
This comment has been minimized.
This comment has been minimized.
awesome! |
This comment has been minimized.
This comment has been minimized.
Works! so happy! |
This comment has been minimized.
This comment has been minimized.
awesome |
This comment has been minimized.
This comment has been minimized.
I had the same issue, but none of these solutions helped me. For whom it is not not working just try this code and you are done
|
This comment has been minimized.
This comment has been minimized.
@areghunanyan it worked amazingly, thanks |
This comment has been minimized.
This comment has been minimized.
awesome! |
This comment has been minimized.
This comment has been minimized.
@areghunanyan Pukka... Thank you so much..... |
This comment has been minimized.
This comment has been minimized.
Thanks a lot . |
This comment has been minimized.
This comment has been minimized.
@areghunanyan thanks |
This comment has been minimized.
This comment has been minimized.
You can check this as well... |
This comment has been minimized.
This comment has been minimized.
Great idea!! |
This comment has been minimized.
This comment has been minimized.
Nice! |
This comment has been minimized.
This comment has been minimized.
not working in tablet |
This comment has been minimized.
This comment has been minimized.
Good ! Tanks @ |
This comment has been minimized.
This comment has been minimized.
I like your used of explicit variables for clarity, but the difference between your scrollHeight and scrollPosition never went to zero because the $(window).scrolltop was a float/double that never maxed out, at least in Chrome Version 68.0.3440.84 (Official Build) (64-bit). Here's my solution:
|
This comment has been minimized.
This comment has been minimized.
All of these damn solutions do not work on mobile devices |
This comment has been minimized.
This comment has been minimized.
thanks! my boss |
This comment has been minimized.
This comment has been minimized.
Thanks! Work Good! |
This comment has been minimized.
This comment has been minimized.
Thanks a lot! |
This comment has been minimized.
This comment has been minimized.
works perfectly on desktop and mobile version! |
This comment has been minimized.
This comment has been minimized.
works perfect, thank you! |
This comment has been minimized.
This comment has been minimized.
Hi, |
This comment has been minimized.
This comment has been minimized.
awesome |
This comment has been minimized.
This comment has been minimized.
For those who find that this script doesn't work, check this property in your HMTL file .. < !DOCTYPE html >. As I found out, this can cause the window and document to report the same value, which breaks this script. This happens specifically in Chrome. And, if the tag is present, but specifies a URL after it, it may be necessary to remove the URL, or change it. Welcome to the sauce that is the never ending problem of a Universal Interface. jquery $(window).height() == $(document).height() |
This comment has been minimized.
This comment has been minimized.
Does this work in mobile browser with responsive layout bootstrap? |
This comment has been minimized.
This comment has been minimized.
Is it possible to pause between scrolls? |
This comment has been minimized.
This comment has been minimized.
Does Not work on mobile |
This comment has been minimized.
This comment has been minimized.
Will this work on mobile on tap? |
This comment has been minimized.
This comment has been minimized.
but it does not works on the popup |
This comment has been minimized.
This comment has been minimized.
awesome |
This comment has been minimized.
This comment has been minimized.
Awesome. |
This comment has been minimized.
This comment has been minimized.
Google Chrome gives the full height of the page if you call Instead, use
|
This comment has been minimized.
This comment has been minimized.
don't work on mobile devices. |
This comment has been minimized.
This comment has been minimized.
NON JQUERY version
|
This comment has been minimized.
This comment has been minimized.
@areghunanyan - worked perfectly! |
This comment has been minimized.
This comment has been minimized.
This code works perfect! How to modify this code to trigger event 100px before bottom? |
This comment has been minimized.
This comment has been minimized.
@stanley123george i am wondering the same, but then about whether it is possible to trigger the event for a certain div |
This comment has been minimized.
This comment has been minimized.
I also had the same problem with you. On mobile don't work. Can anyone help me? Please!!! |
This comment has been minimized.
This comment has been minimized.
How to detect when user scrolls to the bottom of a div ? - This worked for me. https://www.geeksforgeeks.org/how-to-detect-when-user-scrolls-to-the-bottom-of-a-div |
This comment has been minimized.
This comment has been minimized.
better non-jquery version |
This comment has been minimized.
This comment has been minimized.
works perfect! I tried a lot suggestions and no one worked.. but this one is perfect!.. |
This comment has been minimized.
This comment has been minimized.
potete mandare il file completo che visualizzi i valori |
This comment has been minimized.
This comment has been minimized.
vabbè, ho trovato il modo. |
This comment has been minimized.
This comment has been minimized.
Funciona al 100, thanks! |
This comment has been minimized.
This comment has been minimized.
find out particular elements scroll bottom |
This comment has been minimized.
Works perfectly👍 👍