Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Fading caption transition requires page reload in IE

Posted on 2014-03-13
4
Medium Priority
?
208 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
[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
  • 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

[Webinar] Protection from Cyberattacks

In this session, we’ll dive into the complexities of modern cyber threats and why only multi-vector protection can keep today’s businesses secure through the various stages of a cyberattack, across multiple vectors. Thursday September 14, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
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 customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

730 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