Default settings

$('#sidebar').hcSticky();

No Container

Element is referring to the document

$('#menu').hcSticky({
	noContainer: true
});

Window Top limit

Sidebar distance from the top of Window

$('#sidebar').hcSticky({
	top: 100
});

Window Bottom limit

Sidebar distance from the bottom of Window

$('#sidebar').hcSticky({
	bottom: 100
});

Inner Top

Distance from the top inside of the sidebar content

If sticky content is bigger than the window, innerTop triggers when you scroll up.

$('#sidebar').hcSticky({
	innerTop: 200
});

Inner Top - not following scroll

Same as the above, but doesn't follow scroll (yeah I'm sexy).

$('#sidebar').hcSticky({
	innerTop: 200,
	followScroll: false
});

Inner Sticker

Defines element inside sticky content to trigger sticky

Same rules apply as to innerTop. Be aware of the element margins, it includes them too.

$('#sidebar').hcSticky({
	innerSticker: '.logo'
});

Inner Sticker - not following scroll

$('#sidebar').hcSticky({
	innerSticker: '.logo',
	followScroll: false
});

Bottom trigger

Sidebar bottom distance referring to it's referring element (container or document), for when to trigger stop

$('#sidebar').hcSticky({
	bottomEnd: 300
});

Test it yourself

Set values rationally :)




(you can set: ".facebook" or ".logo")




hcSticky updated

If you notice any bugs, or have some suggestions, please write to: somewebmedia@gmail.com