Solved

Fading caption transition requires page reload in IE

Posted on 2014-03-13
4
204 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
ID: 39928683
Which version of IE are you testing in?
0
 

Author Comment

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

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 39936456
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
ID: 39937552
That did it!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

770 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