Jump to content

JavaScript Inquiry for Swapping Images


Recommended Posts

Hello All,

I have a question in regards to an idea I have and was curious as to which of the JavaScript tutorials would be a good place to start. What I had in mind was an image that would swap through a series of pictures, say for example of 10. I would like these images to swap over over in one of four directions randomly, image 2 would say for example slide image 1 from the top, image 3 would slide from the left, etc. Which of the JavaScript Tutorials here would be a good place to start for this idea? I am aware of the setInterval() command to switch between images after x amount of milliseconds, I just am not sure how to properly function a randomizer for the direction of the swap as well as the amount of images.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...