|
do this code work for you?
the html code:
------------------------------------------------------------
<div id="imgs" style="display:none">
<img src="../uploadimage/117464293723222275.jpg" />
<img src="../uploadimage/117464492814584465.jpg" />
<img src="../uploadimage/117465078560327384.jpg" />
</div>
<img id="slide"></img>
------------------------------------------------------------
the javascript code(base jQuery):
------------------------------------------------------------
function play(){
var imgs = $("#imgs").children();
$("#slide").hide().css({width:'200px',height:'200p x'}).attr('src',$(imgs.get(index)).attr("src")).fa deIn('4');
index ++ ;//global variable
if(index >= imgs .length) index = 0;
setTimeout('play()',4000);
}
$(play);
Last edited by roamer; 03-29-2007 at 04:40 AM..
|