clingify
clingify copied to clipboard
Un-cling once you scroll past nav's parent container
Basically I'd just like for the sticky element to unstick once you scroll past the end of the parent container. In other words, if I have two long sections of content, I'd only like for the sticky element to stick to the first section.
I thought that something like below would stick the element only to the specified parent container:
$(function() {
$('.stickit').clingify({
placeholderClass: 'gallery-menu-container',
breakpointWidth: 830,
locked : function() {
matchOffset($navBar, $navParent);
}
});
});