Closed johncave closed 8 years ago
Here's a Mega link to an html file that demonstrates this in action https://mega.nz/#!w8tHWLKL!XUSYOfeeN7LTRg-S0PRXrbjx9gjeE0BI57o88rp55R0 . Note that Chrome won't execute the Javascript if opening it from hard drive due to CORS restrictions, but Firefox will.
Hello pklauzinski. Jscroll seems to break when the jscroll container relies on the window to scroll, and not it's own scroll bar. Thus the jscroll calculations for scroll position get all messed up. If you download johncaves html and add height:100% to #images-wall, it fixes the issue. That should help you get started on the root cause.
@johncave - are you using display: flex
in your CSS for the content you are scrolling on?
@pklauzinski I've never heard of that CSS property before, so no I wasn't. Though I have it working in isolation now, I've determined that jScroll also doesn't work on a Masonry grid div (Masonry sets the height to an exact number of pixels as part of how it works and for some reason this makes jScroll unable to tell how much is left of the div too) so that is also an issue for me.
Hello, I have similar problem on one of my website, jscroll loads all pages
example: http://gotowysms.pl/teksty-sms/milosne
Any idea?
@CNK001 I use a very similar layout to you but with images instead of words. I eventually didn't end up using jScroll, but everything I tried had the same issue, and how I fixed the issue was to rip out the fancy math they all seem to use to find the bottom of the div, then replace it with a simple "how far down the screen has the user scrolled? Is the bottom of the div nearby?". I could find exact code if you'd like but that should be enough to get you started.
The issue seems to relate to the plugin checking "How far down the div has been scrolled?" but not "how far down the window has been scrolled" if the div being scrolled takes up the whole window. Something like that.
It's only bootstrap 3 css, I tried to add style display: table;
to .scroll, .wrapper and .jscroll-added but unfortunately it doesn't work..
Ok, I solved my problem.
In file jquery.scroll.min.js I changed:
wrapAll ('<div class = "jscroll-inner" />')}
to
wrapAll ('<div class = "jscroll-inner clearfix" />')}
Now everything is working fine :)
+1.. thanks! clearfix solved
Hi, I'm trying to use Jscroll to make a homepage of an image gallery script load the newest images as the user scrolls. A pretty standard usage of Jscroll I imagine. The problem I'm having is that Jscroll just loads every single page it can back to the beginning of time the moment it is triggered on the element, resulting it about 1GB of downloads and crashing the browser. To try to isolate the problem, I reduced the number of images per page down to one and extracted this example to its own page, but the problem persisted. `