Thanks for that! I'm having a little trouble with it - the navbut.highlight state is not showing. It makes the whole div disappear! You can see what happens here:
www.happytobevisuals.com/index2.php
It doesn't seem to matter what I do with the stylesheet - the problem doesn't lie there.
Here's the sylesheet segment if it helps:
Code:
.navbut {
background-position: 0 0;
width: 18px;
height: 18px;
margin: 4px;
float: left;
}
.navbut.highlight{
background-position: 0 18;
}
So maybe I've messed up in implementing the onbeforeslide bit?
Code:
<script type="text/javascript">
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [846, 101], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["images2/slide1.png", "", "", ""],
["images2/slide2.png", "", "", ""],
["images2/slide3.png", "", "", ""],
["images2/slide4.png", "", "", ""],
["images2/slide5.png", "", "", ""],
["images2/slide6.png", "", "_new", ""]
],
displaymode: {type:'auto', pause:6000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
extrabuttons: {pend: '.bob', nextprevresume: false, navfade: 1, navbutonly: true},
navbut: '<a href="javascript:void(#%i)"><div class="navbut" style="background-image: url(images2/fadeshow_navbut.png);"></div></a>',
onbeforeslide: function(index){
var lng = this.setting.imagearray.length;
this.setting.$nav.removeClass('highlight').each(function(i){
if(i % lng === index){
this.className += 'highlight';
}
});
},
onpauseplayswitch: function(pauseplaybuts){
var ppstatus = this.setting.$togglerdiv.find('.pauseplaystatus');
if(pauseplaybuts.hasClass('running')){
ppstatus.html('running');
} else {
ppstatus.html('paused');
}
}, togglerid: "fadeshow1toggler"
})
</script>
Here's the fadeshow toggler div:
Code:
<div id="fadeshow1toggler" style="width: 100%; text-align: center;"><span class="bob"></span></div>
Also, see how the navbuts are lining up vertically? I'm not sure why that's happening, do you have any ideas? (They were sitting nicely beside each other like I asked them to before I started trying to use onbeforeslide)
Thanks so much!
Alexander Karasulas
Bookmarks