scrollToFixed not working when scrolled content has 100vh height
Opened this issue · 0 comments
jschroeerluecke commented
My content is being scrolled and it has height set to 100vh.
But scrollToFixed won't work with that height, if I change that it works perfectly.
But I need the 100vh height. Is there a work around ?
I am using this code
var summaries = $('.summary');
summaries.each(function(i) {
var summary = $(summaries[i]);
var next = summaries[i + 1];
summary.scrollToFixed({
marginTop: $('#header').outerHeight(true),
limit: function() {
var limit = 0;
if (next) {
console.log($(next).offset().top - $(this).outerHeight(true) - 0);
limit = $(next).offset().top - $(this).outerHeight(true) - 0;
}
return limit;
},
zIndex: 2
});
});
I am using this on mobile devices with cordova as a web-app.