jquery scrollToFixed stopped when it reached the very top of the page

k3love

New Member
jquery scrollToFixed stopped when it reached the very top of the page, and it just appears on top of the div that is suppose to be fixed at the very top.Here is what I have so far.\[code\]var arr = new Array();$('div[id^="post"]').each(function(){ // do something with it... var id = $(this).attr("id").slice(5); //alert(id); arr.push(id); $(this).css('background-color', 'green');}); for (i = 0; i < $('div[id^="post"]').length; i++) { //alert(arr[i+1]); $('#float-'+arr).scrollToFixed({ limit: $('#post-'+arr[i+1]).offset().top - $('#float-'+arr).height()-220 }); }?\[/code\]I am using the jquery scrollToFixed plugin.I am trying to achieve the same effect on 9gag.com, scroll multiple sidebar divs down t he screen, I got the idea here.When you scroll the page, the right div should become fixed until the end of the left div is reached, but for some reason, the right div become fixed at the very top of the page, I have the top(ad and navigation) div set to fixed all the time.
 
Back
Top