Grow your CSS skills. Land your dream job.

Scroll Triggered Box

  • # March 26, 2013 at 5:12 am

    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.

    # March 26, 2013 at 5:27 am

    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

    # March 26, 2013 at 5:29 am

    both :) sorry.

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

    # March 26, 2013 at 5:41 am

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

    # March 26, 2013 at 5:50 am

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

    # March 26, 2013 at 5:50 am

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

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".