Open reuhno opened 10 years ago
hi
i had the same issue i resolve this this issue by moving the init methode from $(document).ready( function() {}) to $(window).load(function() {})
it work fine now
Also have this issue, where currentTop
is null
and nothing happens.
Hi, with a big html page that have a preloader in Jquery, when I reload a page (so, i'm not viewing page from the top), script needs a scroll action to appears.
Indeed, the class is-sticky isn't added to the DOM.
So, I think, scroller() function must be called after you init method. It seems it's not actually true.
I must add scroller() after sticked.push() to work, but I'm note sure it's the better way. Eg : sticked.push({ topSpacing: o.topSpacing, bottomSpacing: o.bottomSpacing, stickyElement: stickyElement, currentTop: null, stickyWrapper: stickyWrapper, className: o.className, getWidthFrom: o.getWidthFrom }); scroller();