My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Usage  
Instructions on installing and using JQuery Scroll Follow
Updated Feb 4, 2010 by whoo...@gmail.com

Usage

  1. Include JQuery
  2. <script type="text/javascript" src="jquery.js"></script>
  3. Include required plugins, including Scroll Follow:
  4. <script type="text/javascript" src="ui.core.js"></script>
    <script type="text/javascript" src="jquery.easing.js"></script>
  5. Call Scroll Follow on the desired DOM object: See Example
  6. <script type="text/javascript">
    	$( '#example' ).scrollFollow();
    </script>
  7. Or call Scroll Follow on the desired DOM object and give it some parameters: See Example
  8. <script type="text/javascript">
    	$( document ).ready( function () {
    		$( '#example' ).scrollFollow( {
    			speed: 1000,
    			offset: 60,
    			killSwitch: 'exampleLink',
    			onText: 'Disable Follow',
    			offText: 'Enable Follow'
    		} );
    	} );
    </script>
  9. The Scroll Follow object will remain inside its immediate container. See Example
  10. Or you can specify a parent (by ID) for the Scroll Follow object to consider its container: See Example
  11. <script type="text/javascript">
    	$( document ).ready( function () {
    		$( '#example' ).scrollFollow( {
    			container: 'outer'
    		} );
    	} );
    </script>
  12. Scroll Follow uses the "top" property of an object to slide it. Therefore, the "position" of the object must be set to either "relative" or "absolute." Other than that limitation, the Scroll Follow object should be completely configured through CSS.
Comment by nz.david...@gmail.com, Oct 16, 2008

the "See Example" links are incorrect :(

Comment by project member whoo...@gmail.com, Oct 29, 2008

Thank you. Fixed

Comment by shark.by...@gmail.com, Jan 23, 2009

in Firefox the container doesn't seem to work if the position is relative and the container is not the immediate container. i.e. div(container) > div > scrollobject. doesn't seem to work. have to prove again but in pre-existing page it's just scrolling right on through the container. position had to changed to relative to fix IE bug, it worked flawlessly in FF with position absolute

Comment by thibault...@gmail.com, Jan 23, 2010

Where are the required plugins like ui.core? Thanks.

Comment by omarci...@gmail.com, Mar 15, 2010

fdfdfd

Comment by dmitry.g...@gmail.com, May 15, 2010

# Include required plugins, including Scroll Follow:

<script type="text/javascript" src="ui.core.js"></script> <script type="text/javascript" src="jquery.easing.js"></script>

Why don't you add scrollfollow.js here also?

Comment by Christia...@gmail.com, Jul 28, 2010

how does it works horizontally?

Comment by raymond....@gmail.com, Jan 25, 2011

Does not seem to work with elements position with either fixed,absolute,relative ?

Comment by eluminou...@eluminoustechnologies.com, Jun 30, 2011

;;;

Comment by Alexande...@gmail.com, Feb 2, 2012

too bad it only works with an old version of JQuery ... 1.2.6 works but 1.7.1 won't!


Sign in to add a comment
Powered by Google Project Hosting