JS Plugins JavaScript
On branch current
Latest: ???/cur
Running: c4c9be7 (v1.0.15)
??? commits behind

Makes an element follow you within the bounds of a container as you scroll.


Activate follow-me.js using $('#follow-me').follow().

<div id="container" class="follow-container">
  <div id="follow-me" class="follow">
#follow-me {
  position: absolute;


Pass in options like this:

  container: 'my-container-name'
containerStringcontainerID of the containing element.
speedInteger500Animation speed in milliseconds.
offsetInteger0Offset from the top. Ignored if offsetElement is set.
offsetElementStringnullIf set, uses the height of this element as an offset.
minIntegernullMinimum screen width to enable this plugin.
maxIntegernullMaximum screen width to enable this plugin.


Use events like this:

  topStart: myFunction
topStartFires when moving to the top.
topEndFires when the top has been reached.
bottomStartFires when moving to the bottom.
bottomEndFires when the bottom has been reached.
movingStartFires when moving.
movingEndFires when moving stops.