confused and dazed Posted August 11, 2014 Share Posted August 11, 2014 Hello internet. I have a simple image slider that works well. However I have not been able to get the images to fade in. Can anyone direct me to a good tutorial on JavaScript that may teach me how to incorporate image fading into my slider? Thanks. Link to comment Share on other sites More sharing options...
niche Posted August 11, 2014 Share Posted August 11, 2014 http://snook.ca/archives/javascript/simplest-jquery-slideshow Link to comment Share on other sites More sharing options...
davej Posted August 11, 2014 Share Posted August 11, 2014 This example demonstrates fade out... http://w3schools.invisionzone.com/index.php?showtopic=50508 Link to comment Share on other sites More sharing options...
confused and dazed Posted August 12, 2014 Author Share Posted August 12, 2014 Thanks for the links. I took a look at both. However it seems I am using a different approach to cycle through the images. I am using the code below. I set up individual variables and the function below steps through them. I would like to fade the images In/Out using this code I started with. Any recommendations? var step=1function slideit(){if (!document.images)returndocument.images.slide.src=eval("image"+step+".src")if (step<7)step++elsestep=1setTimeout("slideit()",2500)} Link to comment Share on other sites More sharing options...
davej Posted August 12, 2014 Share Posted August 12, 2014 You should try to avoid using eval(). See the code here... http://www.w3schools.com/jsref/coll_doc_images.asp To fade between images you will need to fade out a foreground image to reveal the background image. After the fade is complete you swap the images to prepare for the next fade. Link to comment Share on other sites More sharing options...
confused and dazed Posted August 12, 2014 Author Share Posted August 12, 2014 Hmmmm.... I will go back and look over all the information provided. 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