eko_wardoyo Posted October 23, 2010 Share Posted October 23, 2010 hi guys, i have a problem to random some images with auto refresh can you help me Link to comment Share on other sites More sharing options...
[dx] Posted October 23, 2010 Share Posted October 23, 2010 Do you have some prepositions what it will have to do? Reading from what, to where.. Link to comment Share on other sites More sharing options...
eko_wardoyo Posted October 25, 2010 Author Share Posted October 25, 2010 i use this code <html> <head> <title></title> <script type="text/javascript" src="js/jquery-1.4.3.min.js"></script> <script language="javascript" type="text/javascript"> $im_count = 0; $img_array = new Array("image/1.jpg","image/2.jpg"); function changeImage(){ $("#imgholder").fadeOut().attr("src",$img_array[$im_count%2]).fadeIn(); $im_count++; window.setTimeout("changeImage()",5000); } $(function(){ changeImage(); }); </script> </head> <body> <h1>This is heading</h1> <img src="1.jpg" id="imgholder"> </body> </html> the problem have been solved Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.