homepage Welcome to WebmasterWorld Guest from 54.234.228.64
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
ie lag
ie lags when using css background
copongcopong




msg:1487871
 7:05 pm on Mar 28, 2004 (gmt 0)

function change1(){
document.getElementById("test").style.background = "url(images/1.jpg) #fff left no-repeat";
}
function change2(){
document.getElementById("test").style.background = "url(images/2.jpg) #fff left no-repeat";
}
end so on ....

<a href="Link 1" onmouseover="change1();" class="l2">
etc ....
<div id="test">&nbsp;</div>

when the cursor is hover on the link, a pic would appear in the div#test as a background (size is almost 600 by 200), the problem is with msie where in it lags, and appears to download or recheck the image again instead having the hover to change instantly like in mozilla.

is there a way to accomplish and remove the lag in msie?

Thanks

 

isitreal




msg:1487872
 8:13 pm on Mar 28, 2004 (gmt 0)

Not as far as I know, MSIE doesn't cache background images, it has to get them from the server each time, that's annoying but no real way around it that I know off.

There is a supposed fix for this using CSS alone, involving having only one background image, and changing its position on hover. But that doesn't work at all on older PC's running MSIE, the result is far worse than your current problem, they call it the 'flickering problem', but it's actually 'total display failure problem', if you test on a slow old pc and you'll see the problem right away, which unfortunately people don't do before putting that out as a solution.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved