darkofman Posted October 20, 2014 Share Posted October 20, 2014 Hi , I am trying to make a imageslider with javascrip so far I have this var count = 1 ;var Max= Y ;var Min= Wfunction imageslider (count) { var Image=document.getElementsById("firstimg") count=count+1; if(count>Max){ count=Min; } if(count<Min) { count=Max ; } Image.src="images/pic"+count+".jpg"; the idea is naming all the pics in my folder pic+ a number so what I am missing I believe is the delay , and I have no idea how to do that Link to comment Share on other sites More sharing options...
justsomeguy Posted October 20, 2014 Share Posted October 20, 2014 Look up the setInterval and setTimeout functions. You would use those for any kind of animation, including fading or things like that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now