I want to make the view auto advance like a slideshow.
anybody done this yet? i'm trying with this stuff below, and it sorta
works, but when you close the slideshow then open it again it does not work.
var t;
var timer_is_on=false;
function timedCount(){
$.nyroModalNext();
t=setTimeout("timedCount()",4000);
}
function doTimer(setting){
if (setting==true){
timer_is_on=true;
timedCount();
}else{
timer_is_on=false;
clearTimeout(t);
}
}
$('#slideshowButton a').click(function(e) {
e.preventDefault();
var title=$('.selected a').attr('href');
title=title.replace('#','');
$('a[title='+title+']').nyroModalManual({
bgColor: '#000000',
galleryLoop : true
});
//doTimer();
$.nyroModalSettings({
beforeHideContent: function(elts) {
doTimer(false);
}
});
$.nyroModalSettings({
endShowContent: function(elts) {
setTimeout(function(){
doTimer(true);
},4000);
}
});
return false;
});
Try with this code: var t; function timedCount() { $.nyroModalNext(); t = setTimeout("timedCount()", 4000); } $('#slideshowButton a').click(function(e) { e.preventDefault(); $(this).nyroModalManual({ bgColor: '#000000', galleryLoop : true, beforeHideContent: function(elts) { clearTimeout(t); }, endShowContent: function(elts) { t = setTimeout("timedCount()", 4000); } }); return false; });