Forums

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

Home Forums JavaScript show div when the very bottom on the website is reached

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #144737
    Anonymous
    Inactive

    I have print button and i want it to show when the user reaches the very bottom of the website. it will have display:none with css and maybe using jquery display:visible but when the user reaches the bottom. http://reallycoolstuff.net/PROJECTS/jobmagnet/

    #144743
    Kuzyo
    Participant

    Maybe, you find usefull http://codepen.io/Kuzyo/pen/pcIhx

    #144744
    Anonymous
    Inactive

    Something like that is what i am looking for. But i also want the button to hide when the user scrolls up.

    #144746
    Kuzyo
    Participant
    #144754
    Anonymous
    Inactive

    i want it to fade in when the bottom of the site is reached, and fade out when the user scrolls out of the bottom. as soon as they start scrolling up from the bottom. That doesnt do it.

    #144755
    Kuzyo
    Participant

    I thought, it will help

    #144757
    Anonymous
    Inactive

    @Juzyo and it did thank you for your help. But i want something slightly different.

    #144758
    Alen
    Participant
    #144763
    Anonymous
    Inactive

    @Alen Looks like its working but the opposite way. Any idea why? http://reallycoolstuff.net/PROJECTS/jobmagnet/

    #144768
    Alen
    Participant

    Did you hide the button first. As you can see in the code I provided first line hides the button then, when page reaches bottom, button fades in.

    Try that, see if it works

    #144769
    Anonymous
    Inactive

    Yes i did and its the same. I removed it because i hide the buttons with css instead of jquery. Anyway i added the hide() in the jquery and its still not working.

    #144780
    Kuzyo
    Participant

    @Jarolin It seems that $(window).scrollTop() don’t add to $(window).height() maybe try additionall parentheses this way:

    if( ( $(window).scrollTop() + $(window).height() ) == $(document).height())

    #144830
    Anonymous
    Inactive

    @crocoDillon Yours is also working but the opposit way too, This is totally weird. And i would preffer to hide the buttons because they are still clickable when hidden. Also when you scroll with the scroll bar and hold it the buttons only dissapear once you let go.

    #144859
    Alen
    Participant

    @CrocoDillon i like your solution better.

    #144943
    meisp123
    Participant

    Located in Zhengzhou, “Henan” where a team soccer jerseys for cheap
    in the province, not a city. They are still using last season’s jersey, NIKE, which give them a decent design, red and green with a bit of fun. There may be no new Jersey, but probably just a mass of templates in conjunction with a blue NIKE

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