garand / sticky

jQuery Plugin for Sticky Objects
Other
3.3k stars 1.06k forks source link

Stutter and flicker because of no threshhold option? #213

Open coffeeneed opened 8 years ago

coffeeneed commented 8 years ago

I love your plugin, but I have one problem I really want to get solved. I have a large splash image on top of my onepager and under that, I have another

with some logos. The navigation is on top of the splash but when I scroll down (or autoscroll through the menu) to get to the logos, the scroll accidentally scrolls down to the breakpoint in which sticky is triggering. So it jumps from ordinary nav to sticky nav automatically (like a loop).

So my question is: are there any form for threshold or "wait" option available? I have read the docs and clearly it's not. But are there any workaround, please?

Cheers.

Blackscr33n commented 8 years ago

I solved this with setting the element default to position absolute

tinyearth commented 8 years ago

I had a similar problem to you with stuttering and jumping in a loop, because the script was rewriting the inline fixed position styles during scroll. I have a negative top property set on my sticky. Your referenced issue contains the fix.

Here are the forked files by tomlagier which don't look to be merged into garand's master yet.

coffeeneed commented 8 years ago

@tinyearth Thanks for your help and tip :) Will check it out now.