1 Replies - 1061 Views - Last Post: 16 May 2013 - 10:24 AM

#1 bigallyo88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 10-April 13

Jquery Image Fixed when reaches top then over lap

Posted 15 May 2013 - 08:58 AM

Hello

quick question, i want to create an effect where the images scroll up the page and then get fixed at the top, when they reach the top they get stacked on top of each other sort of like this http://denicler.eu/en/lookbooks/2

ive set my z indexes on my images so when they reach the top they get stacked but cant seem to fix the images to the top when they reach it..

got this so far any help would be great...


$(document).ready( function() {

    $(window).scroll( function() {
        if ($(window).scrollTop() > $('#lookbook img').offset().top)
            $('#lookbook img').addClass('fixed');
        else
            $('#lookbook img').removeClass('fixed');
    } );

} );





Is This A Good Question/Topic? 0
  • +

Replies To: Jquery Image Fixed when reaches top then over lap

#2 laytonsdad  Icon User is online

  • Cheese and Sprinkles
  • member icon

Reputation: 402
  • View blog
  • Posts: 1,720
  • Joined: 30-April 10

Re: Jquery Image Fixed when reaches top then over lap

Posted 16 May 2013 - 10:24 AM

Take a look at the script that runs the site you linked. This file has all the animations they used in it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1