<div id="gallery"><div id="slider-nav">
<ul>
<li><a href="#">Carbonara</a></li>
<li><a href="#">Coffee</a></li>
<li><a href="#">Coffee Shake</a></li>
</ul>
</div>
<div id="slide">
<img src="images/carbonara.png"/>
<img src="images/coffee.png"/>
<img src="images/coffee-shake.png"/>
</div><!-- end of slide -->
</div><!-- end of gallery --><script type="text/javascript">
$
(document).ready(function(){
$
('#slide').cycle({
fx
: 'scrollVert',
speed
: '500',
timeout
: 4000,
pagerEvent
: 'hover',
pagerAnchorBuilder
: function (index,slide) {
return '#slider-nav li:eq(' + (index) + ') a' ;
},
activePagerClass
:'active'
});
});
</script>I'd like the background of the text to turn a different color when its corresponding image is being shown:
.active{background-color: green;}