Solved

Fading caption transition requires page reload in IE

Posted on 2014-03-13
4
202 Views
Last Modified: 2014-03-18
I have a horizontally-scrolling feature at www.mauivacationrental.com/view.htm   There are three images which scroll sequentially, and then repeat.  The caption transitions in sync with the image on the screen, using javascript and css.  This works under all major browsers except IE.  The first caption transition is consistent, but the next two often require a page reload.  Is there a way to improve the caption performance under IE?
0
Comment
Question by:ddantes
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Rartemass
Comment Utility
Which version of IE are you testing in?
0
 

Author Comment

by:ddantes
Comment Utility
Currently IE11.  However, I noticed this behavior in IE10 previously.
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
Comment Utility
The current scroll position is used to determine which text element needs to be shown so the varying speed of the scroll, while annoying and probably fixable, should not cause problems with that.

It seems to be a timing issue regarding the image.load function which sets the 'pw' variable.

Try getting rid of the document ready function where the image.load function is set
$(document).ready(function(){
// comment this out or just delete the whole document.ready function
// document.getElementById("pic1").onload = function() { pw = document.getElementById("pic1").width; };
});

Open in new window

and instead doing it directly from the image tag:
document.write('<img id="pic1" src="images/view.jpg" alt="" onload="pw=this.width;"><img id="pic2" src="images/view.jpg" alt="">')

Open in new window

0
 

Author Closing Comment

by:ddantes
Comment Utility
That did it!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now