Need Help with navigation buttons for a gallery.
Hello to all,
For starters I am trying to create abutton that pauses the cycle of the images array
For every image the script creates a thumbnail. If you click on a thumbnail. The cycle stops and the image is change according to the thumbnail.
- var thumbsarr=['<ul class="fpthumbs" style="z-index:1001">']
- for (var i=0; i<images.length; i++){
- imagesarr[i]=new Image()
- imagesarr[i].src=(options.imagesobj.baseurl)? options.imagesobj.baseurl+images[i][1] : images[i]
- imagesarr[i]._index=i
- thumbsarr.push('<li></li>')
- }
- thumbsarr.push('</ul>')
- jQuery(function($){
- var slideshow=fullpageslideshow
- var layers=$('<div style="position:absolute;left:0;top:0; width:100%; height:100%;overflow:hidden;background:black;" />').clone().andSelf().appendTo(document.body)
- var thumbs=$(thumbsarr.join('')).appendTo(document.body)
- thumbs=thumbs.find('li')
- thumbs.each(function(i){
- var $thumb=$(this)
- this._index=i
- $thumb.css({left: 60*i+20})
- $thumb.click(function(){
- clearTimeout(slideshow.setting.rotatetimer)
- slideshow.changeimage(this._index)
- })
- })
- slideshow.layers=layers
- slideshow.thumbs=thumbs
- slideshow.templayer=$('<div style="position:absolute;left:-5000px;top:-5000px;visibility:hidden" />').appendTo(document.body)
- slideshow.signalcomplete()
- $(window).resize(function(){
- if (imagesarr[slideshow.curimage].complete==true)
- var cssattr=slideshow.scaleimage(imagesarr[slideshow.curimage])
- slideshow.layers.eq(slideshow.layerorder.fg).find('img').css(cssattr)
- })
- })
I know that in order to stop the image rotation I need to make a function like this...
- stop(){
- clearTimeout(slideshow.setting.rotatetimer);
- }
but I don't know where exactly to include it and firebug says that stop() is undefined.
Any help would be appreciated. Thank you