Forums

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

Home Forums JavaScript Changing background colour based on horizontal scroll position

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #247271
    Ritaqwerty
    Participant

    Hi,
    I’m trying to make my background colour change based on the scroll position. I’ve found a lot of tutorials, but the thing is, my website scrolls horizontally so whenever I use the codes I find, it just doesn’t work because they search for the vertical scroll position which is always 0!
    I want something like https://jsfiddle.net/schakalwal/63zhcu0s/ but with horizontal scroll.
    Thanks!

    #247273
    Shikkediel
    Participant

    Just a few quick fixes…

    Link

    #247274
    Senff
    Participant

    You could start with something like this:

    http://codepen.io/senff/pen/NRQLxJ

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