Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Javascript "fade-in" effect for picture slideshow?

Posted on 2010-09-23
6
Medium Priority
?
1,136 Views
Last Modified: 2013-11-19
I have a JavaScript function that is used to create a simple slideshow on my webpage. In IE, it has a nice fade in effect between slides. How can I make the effect work for other browsers like Firefox/Safari/Chrome/etc ?
0
Comment
Question by:rwskas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 13

Accepted Solution

by:
darren-w- earned 1000 total points
ID: 33743161
Hi,

If you use the jquery fadein() function it will be compatible with most browsers, but if you did decide to reconfigure your code you would need to re-factor it to work with each browser, you will need to supply the code so we could take a look

http://api.jquery.com/fadeIn/

Darren

0
 
LVL 22

Expert Comment

by:kadaba
ID: 33743304
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 33743513
<< I have a JavaScript function that is used to create a simple slideshow on my webpage>>
Can you share that method, so that we can suggest the changes?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Author Comment

by:rwskas
ID: 33744672
Sorry, I posted in haste this morning and forgot to put the function! Here is what I am using: (Disclaimer: I am a beginer, and this is cobbled together from things I found via google)

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
0
 
LVL 40

Assisted Solution

by:Gurvinder Pal Singh
Gurvinder Pal Singh earned 1000 total points
ID: 33744845
<<document.images.SlideShow.style.filter>>
Assuming that SlideShow is the value of name attribute of the img tag, i don't think it works on all browsers.
Also you are checking for the document.all, which is not supported on all browsers.

would encourage you to use document.getElementById()

Similarly, filter is also not supported on all browser, infact to my knowledge, it is only supported on IE

I would encourage you to use jquery only (like fellow experts), since it takes care of all these problems and give you an same interface to make things work the same way on all browsers.




0
 
LVL 6

Author Closing Comment

by:rwskas
ID: 33788014
Going to use the JQuery technique, thanks for the pointing me in the right direction.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question