clingify icon indicating copy to clipboard operation
clingify copied to clipboard

Un-cling once you scroll past nav's parent container

Open modermo opened this issue 9 years ago • 0 comments

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);
              }
      });
  });

modermo avatar Oct 20 '16 05:10 modermo