Closed sannu closed 11 years ago
Hi!
Yes, this is a problem. But it's a problem that is "built-in" to the very logic of how SmoothDivScroll works. If the width of all scrollable elements is less than the width of the scroller (or window if the scroller covers all of the window) there really is no need for a scroller since you can view all the elements on one screen. But I still see your point and this will become increasingly important as responsive web pages become more common.
Do you have any suggestion as to what you would like to happen if the content is not wide enough to fill the scroller?
Regards, Thomas
Hey!
Here are my ideas:
I have considered duplicating the content of the scroller if there's not enough content to make the swapping action work like it should. But in doing that I would introduce a number of other problems. What if you have endless autoscrolling when the page loads and manual scrolling when the user starts interacting with the scoller. Then you'd be stuck with extraneous content that doesn't really belong in the scroller because you (as a developer) haven't put it there. I have a hunch it would become confusing. And it would become very difficult to have the plugin keep track of duplicate content added to the scoller and when to keep it and when to remove it.
So the basic advice when you use endless scrolling is: split up your content so Smooth Div Scroll can swap elements properly and make sure you have enough elements to go around.
Hi! heres fiddle for ya: http://jsfiddle.net/sndr/msGUK/1/ strech the result window enough to see the effect