Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Horizontal drag scrolling

  • This topic is empty.
Viewing 6 posts - 46 through 51 (of 51 total)
  • Author
    Posts
  • #206600
    Shikkediel
    Participant

    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)…

    mozilla.org/detecting-touch

    #206604
    grimski
    Participant

    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.

    #206616
    Shikkediel
    Participant

    The reverse approach, checking for specific support, is probably a better approach now that I’ve thought a bit about it :

    http://stackoverflow.com/a/10862077/3168107

    #206623
    Shikkediel
    Participant

    Have a look if this does the trick…

    codepen.io/anon/pen/XbwNJw

    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 :

    codepen.io/anon/pen/oXRZYO

    #240375
    kelly
    Participant

    @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?

    #240383
    Shikkediel
    Participant

    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.

Viewing 6 posts - 46 through 51 (of 51 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.