16

Has anyone had any experience using the excellent Sticky Kit jQuery plugin? http://leafo.net/sticky-kit/

I can't figure out how to use the 'offset_top' option? The documentation for the options is a bit vague, the example shown is below:

$("#sticky_item").stick_in_parent(options)

I guess I have to write something like this:

$("#sticky_item").stick_in_parent(offset_top)

But how do I specify the number of pixels I want to offset #sticky_item by?

Any help would be greatly appreciated!

Ram
  • 143,282
  • 16
  • 168
  • 197
StephenMeehan
  • 1,083
  • 2
  • 15
  • 26

1 Answers1

36

Ah, figured it out.

To add a 20 pixel offset to #sticky_item do this:

$("#primary").stick_in_parent({offset_top: 20});
StephenMeehan
  • 1,083
  • 2
  • 15
  • 26