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

Home Forums JavaScript ScrollTo like Google Images/Netflix

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #238648
    Hailo Coyier

    I’m trying to make something in the style of Google Images/Netflix.
    I found some code and merged It with Ken Wheeler’s Slick. I’m not very experienced I would very much appreciate some help. I was told to use something like scrollTo element but I’m still lost.

    Here’s the effect I want:
    If you go to Google Images and pick an image you will notice it scrolls into view.


    Hi @HailoCoyier!

    If don’t want a smooth animation (just jump), then use scrollTo, but it looks like you want an animation.

    I added the following inside the $('.thumb').click... code (demo):

    var top = $(this).offset().top - 10; 
     // window.scrollTo(0, top); // no animation
     $('html, body').animate({ scrollTop: top }, 1000);
    Hailo Coyier

    Sorry for the late reply. But yes that’s exactly what I was looking for! Thank you so much, Mottie.

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