Streaming live at 10am (PST)

Change Background Image with Trigger


#1

It would be great if i can change the background of an element with any of the triggers, specifically for "onscroll" and "onSlideActive".

I have a background DIV that I want to change when a new "section" (100% height) is scrolled into view. I am using custom coding to "snap" each section when a user scrolls so that each section is always 100% in view. I want to cross fade and change backgrounds every time a new section scrolls in or when I change slides on a slider.


#2

You could create divs with each of the background colors and set them to Show/Hide on scroll as need be with a fade in and fade out of opacity. Or we can wait for other interactions to come out later on like color change and such smile

What scroll jacking js are you using for the snap to? Can I see your example? smile
Thanks!


#3

I'm using panelSnap

works great.. although it gets buggy when you put Slider components into the sections.
http://guidobouman.github.io/jquery-panelsnap/

actually, how would you go about doing simple things like onClick, change/toggle between 2 backgrounds on a DIV. Not possible currently right?


#4

I actually just noticed that you can put multiple image backgrounds for DIVs.. it would be GREAT if we can control which background image to show via triggers.. and enable transitions..


#5