Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m frustrated

Overflow Scrollfollow

I have a div that I have set to overflow auto and when I try to use the autoscroll it will only scroll if the body scrolls but I can't get it to work if the "master_container" scrolls
1 person has
this question
+1
Reply
  • I’m happy
    Nevermind I figured it out. I had to modify the jquery.scrollFollow.js. I modified

    From

    var pageScroll = $( document ).offset().top;

    To

    var pageScroll = $( "#master_container" ).offset().top;


    AND

    From

    $( document ).scroll( function ()
    {
    ani( box, initialTop );
    }
    );

    To

    $( "#master_container" ).scroll( function ()
    {
    ani( box, initialTop );
    }
    );


    #master_container being the id of the div that scrolls.

    Now if you want the object to scroll when the body scrolls also you would probably have to keep both sets of code. This is just a guess and is untested.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated