views:

127

answers:

2

In IE6 only, using Accordion jQuery plugin to open DIV element, all img element (backgrounds too) inside the DIV are loaded at each click to open or close the choosen element.

Exemple : there is 10 closed DIV, you click on the 2nd one to open it, you can see in the status bar the requests to load all img elements inside the both 10 DIV, you click to close it do it again. If you do it for 2 or 3 DIV it even can lock the page.

How is managed img elements load in not displayed elements by css ? If i pre-load img it's the same thing

No pb. in Firefox or IE7, IE8

Thank you

A: 

Check your settings. It sounds like you're using the typical developer setting to load pages "every time i visit the page", which make IE6 redownload the images every time. Your standard users will have the setting "automatically", which will mitigate this error.

jvenema
+1  A: 

Put this in your code, that should do the trick:

if ($.browser.msie) { 
    document.execCommand("BackgroundImageCache", false, true); 
}

The problem lies with the fact the Accordion use background images for which IE6 as problem with the cache settings. You can browse on the web for more info on this.

Jean-Philippe Martin