Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Fading caption transition requires page reload in IE

Posted on 2014-03-13
4
Medium Priority
?
209 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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)
Suggested Courses

877 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