diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2007-07-22 07:02:58 +0000 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2007-07-22 07:02:58 +0000 |
commit | 168f6243a42314347bf385c9f79ccf0fdd7729c2 (patch) | |
tree | 9761053ba6e0a40bde1672c181eb0efe42126acf /phpfspot.js | |
parent | 75a329ec022ef21019afb17aecf776a10083e0cb (diff) |
issue56, play and pause of autobrowsing is now possible
git-svn-id: file:///var/lib/svn/phpfspot/trunk@238 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.js')
-rw-r--r-- | phpfspot.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/phpfspot.js b/phpfspot.js index 588298a..6bc0d2c 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -313,12 +313,25 @@ function nextSlide() document.getElementById('slide_img').src = next_img; } +function startAutoBrowse() +{ + if(!autobrowse) { + autoBrowse(); + autobrowse = setInterval("autoBrowse()", 5000); + } + else { + clearInterval(autobrowse); + autobrowse = 0; + document.getElementById('autobrowse_ico').src = "resources/32_play.png"; + } + +} function autoBrowse() { if(document.getElementById('next_link')) { var next_link = document.getElementById('next_link').href; window.location.href = next_link; - setTimeout("autoBrowse()", 5000); + document.getElementById('autobrowse_ico').src = "resources/32_pause.png"; } } |