somewebmedia / hc-sticky

JavaScript library that makes any element on your page visible while you scroll.
https://somewebmedia.github.io/hc-sticky/
MIT License
463 stars 115 forks source link

Is it possible to push stuff down at the bottom while scrolling? #51

Closed aligajani closed 6 years ago

somewebmedia commented 6 years ago

@aligajani I'm not sure I understand the question. Can you explain in more detail please?

yasir-rafiq commented 6 years ago

in loadmore when new data append at the end sticky bar position got disturb. even got this error "Cannot read property 'getBoundingClientRect' of null"

somewebmedia commented 6 years ago

@yasir-rafiq Have you tried using reinit method after you added your dynamic content?

yasir-rafiq commented 6 years ago

can you explain how I can use this method?

somewebmedia commented 6 years ago

@yasir-rafiq Are you using it via jQuery or vanilla js?

yasir-rafiq commented 6 years ago

js

somewebmedia commented 6 years ago
var Sticky = new hcSticky('#element');

// some code that appends the data to page

// after that you refresh the sticky
Sticky.refresh();