Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Scroll Triggered Box

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43661
    majooo
    Member

    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.

    #129720
    proudfist
    Participant

    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

    #129721
    majooo
    Member

    both :) sorry.

    like this http://rebelbetting.com/
    but this website is using wordpress plugin :(

    #129722
    proudfist
    Participant

    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
    }
    });

    #129724
    majooo
    Member

    ow nice! how would the html will look like? Sorry for too much asking. :)

    #129725
    majooo
    Member

    by the way I want to put that in all page,.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.