We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Image Slideshow v2 (Automatic)
Topic Started: Jan 6 2012, 05:29 AM (3,243 Views)
JAR
Member Avatar
Fortnite Noob
[ *  *  *  * ]
Name: Image Slideshow v2 (Automatic)
Description: An update to Viral's code Image Slideshow. However, due to the recent demand for an automatic feature in which the images faded in and out on a time-base apposed to clicking an [x]; I thought I would take a stab at it. All credit still goes to Viral.

Code:
 
<script type="text/javascript">
image=["http://z3.ifrm.com/static/acp/acplogo.png","http://z3.ifrm.com/static/acp/settings.png","http://z3.ifrm.com/static/acp/help.png"];
seconds=10;
i=0;
function check(){i++;if(i>=image.length){i=0;
}
setTimeout("update("+i+")",seconds*1000);}function update(i){$(function(){$("#updates").fadeOut("slow", function(){$(this).attr("src",image[i])}).fadeIn();check();
});}
document.write("<center><div class='meta_box'><img id='updates' src='"+image[0]+"' onload='check()' /><br>");
document.write("</div></center>");
</script>

Installation:

To edit, add, remove the images, change this line:

image=["image.png","image.png","image.png"];

To change how long the delay between image is, change the seconds variable:

seconds=10;
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Great Code, Just Installed it on my forum....works with no errors ;)
Quote Post Goto Top
 
JAR
Member Avatar
Fortnite Noob
[ *  *  *  * ]
Glad to here Riaz.
Offline Profile Quote Post Goto Top
 
familywin
Member
[ *  * ]
i love it, thank you.
Offline Profile Quote Post Goto Top
 
Akhil-10
Member Avatar
Imagination Is The Beginning Of Creation
[ *  * ]
Gr8 thanks bro.
Offline Profile Quote Post Goto Top
 
polocolo
Member Avatar
Member
[ *  *  * ]
You rock!
Offline Profile Quote Post Goto Top
 
Johnson404
Member
[ * ]
Hi i tried out this code, and it works at first but then it starts changing every second. how do you fix this? ( i know its an old post but i need an image slider)
Offline Profile Quote Post Goto Top
 
polocolo
Member Avatar
Member
[ *  *  * ]
I have a different banner for each category. Can I make this slideshow for one of the categories only (the remaining banners will stay the same)?

My board: http://wallacehuoforum.info/index/
Edited by polocolo, Aug 13 2016, 04:36 AM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply