Closed Gesparo closed 8 years ago
Scrolling on the window doesn't currently occur due to the way layout is handled. You've figured out on your own that you need to attach it to the layout container.
Beyond that information, we can't really help with this. It is custom code integrating MDL into a project which we can't help with since it isn't a problem with the code we provide. Please try using StackOverflow for support and integration help.
@Garbee I ran into the same problem. It's a simple autoload news! Really It does not work due to the fact that MDL uses $(window). Is it possible to somehow decouple the parameter $(window)?
Instead of using above use this $('.mdl-layout__content').scroll(function() { if($('.mdl-layout__content').scrollTop() + $(window).height() >= $(document).height() - 200 && !inProgress) {
Reference link : - https://github.com/google/material-design-lite/issues/url
$('html, body, div').scroll(function() {
var offset = $('#overview').offset().top;
});
Hello. I use mdl and want to make my native scroll on the page.
Code below doesn't work, maybe mdl change $(window).scrollTop() and $(window).height() :
$(window).scroll(function() { if($(window).scrollTop() + $(window).height() >= $(document).height() - 200 && !inProgress) {
And this code is works:
$('mdl-layout__container').scroll(function() { if($(window).scrollTop() + $(window).height() >= $(document).height() - 200 && !inProgress) {
but not correctly. I use previous function on another site without mdl, and it's work very well. Maybe somebody know how fix this?