Hello,
I have 3 buttons overtop of a slideshow. Each button corresponds to a different slide on the slideshow. For example when I click button1 it goes to the first slide on the slide show, same with button2 to the second slide and button3 to the third.
What I'm trying to do is that when you click any of the buttons, that buttons changes colour (basically stays on the hover effect) showcasing that thats the slide you are on. So if i click button1 and it brings me to slide1, I want that button to change colour (remain on a hover effect) until another button is clicked, where then that other button would change colour.
Here's the code I have which allows me to link each button to a slide. Would I need to add something to this or create a new code? Please let me know and include a code if you can
thank you.
$w.onReady(() => { $w("#button61").onClick(()=> {$w("#fullWidthSlides2").changeSlide(0)}) $w("#button56").onClick(()=> {$w("#fullWidthSlides2").changeSlide(1)}) $w("#button62").onClick(()=> {$w("#fullWidthSlides2").changeSlide(2)}) })
$w.onReady(() => { $w("#button61").onClick(()=> { $w("#fullWidthSlides2").changeSlide(0) $w("#button61").style.backgroundColor="rgb(155,255,55)" }) $w("#button56").onClick(()=> { $w("#fullWidthSlides2").changeSlide(1) $w("#button56").style.backgroundColor="rgb(155,255,55)" }) $w("#button62").onClick(()=> { $w("#fullWidthSlides2").changeSlide(2) $w("#button62").style.backgroundColor="rgb(255,0,0)"; }) })
You will have to complete the code by your own....
Hey, can you give more detail> i am happy to help.