[SPIP Zone] r4219 - /_plugins_/splickrbox/splickrbox.js

Author: booz@rezo.net
Date: Tue Jul 25 21:24:14 2006
New Revision: 4219

Log:
recommencer l annimation quand elle est termine

Modified:
    _plugins_/splickrbox/splickrbox.js

Modified: _plugins_/splickrbox/splickrbox.js

--- _plugins_/splickrbox/splickrbox.js (original)
+++ _plugins_/splickrbox/splickrbox.js Tue Jul 25 21:24:14 2006
@@ -16,14 +16,17 @@
// http://www.mythin.net/pause.js
// et essayer de redemmarer le slide show apres la derniere image

-while(cptj <= max) {
-setTimeout('$("td.image img").splicker('+cptj+');',6000 + cptj*6000);
-//if(cptj==max) cptj=-1;
-cptj++;
-}
+start();
+

});

+
+function start(){
+setTimeout('$("td.image img").splicker('+cptj+');',1000);
+}
+
+
$.fn.splicker = function(i) {
image = this.get(i).cloneNode(true) ;
href = this.get(i).parentNode.href;
@@ -40,15 +43,16 @@
$("div#changeMe").css("top","0px");
}

-setTimeout('$("div#changeMe img").hide_propre();',5000);
-}
+setTimeout('$("div#changeMe img").hide_propre();start()',5000);

+}

$.fn.hide_propre = function() {
this.hide("slow", function(){
         $(this).remove();
       });
-
+if(cptj == max-1){ cptj=0 ;}else{ cptj++ ;}
+//$("#statusMsg").html(cptj+"=?"+max);
}