- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Scroll Triggered Box
Hi i just want to ask if there’s a jquery plug in like this?
http://www.dreamgrow.com/dreamgrow-scroll-triggered-box/
I just want to create a page which displays pop-up box or a box sliding up at the bottom of the page when the user reach the bottom of the page.
I thought smooth scroll to top will solve this.
But I don’t know what’s the right keyword to search it on google.
:(
Thank you.
What is the problem? To detect if the user has reached the bottom of the page or to display the “box”? Or maybe both? :p
both :) sorry.
like this http://rebelbetting.com/
but this website is using wordpress plugin :(
Well i would use .scrollTop() and .height() to check if the user has reached bottom of page. Not so pretty but something like this just to get you going.
var elem = $(‘html’);
var x = $(window).height();
var y = $(“body”).height();
$(window).scroll(function() {
var cur = elem.scrollTop();
x = $(window).height();
y = $(“body”).height();
if(cur >= y-x) {
// bot reached, do something
}
});
ow nice! how would the html will look like? Sorry for too much asking. :)
by the way I want to put that in all page,.