Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Horizontal drag scrolling
I see you like football, haha. Let me read up a bit and check if there aren’t too many edge cases (laptops for example)…
I’m a Newcastle United fan so ‘Endurer’ is probably a better word haha!
I’m going to update the CSS so the page displays as it should on mobile/tablet/touch devices using the article you linked to. Then hopefully look at setting the different container widths with conditional JavaScript.
The reverse approach, checking for specific support, is probably a better approach now that I’ve thought a bit about it :
Have a look if this does the trick…
Tweaked resizing as well. It now realigns the draggable once on the left, 50ms after the final event has finished.
Edit – here’s a variation that keeps the center in place :
@shikkediel, just finished reading this thread, curious if you ever coded the infinite scrolling feature you talked about in the previous page.
Or how could I go about trying to implement something like that?
Never did take the final step on that one…
But I guess it would be a matter of putting the content in the row three times, then using .append()
or .prepend()
depending on towards which side the middle part is leaving the screen. A position adjustment would probably be necessary there as well.
I’m not really about to dive in again but may have a look at it later.