if you are doing stuff the current way, it will allways happen like that, the browser rends normaly all the code and then applys styles.-page may load with everything expanded, then collapse at the end. This is partly intended behaviour, but perhaps a bit odd.
On a side note, i still think that the cleanest way of doing the collapse/expand things is this:
you encapsulate what you want to show in a div, give it an id and a style="display:" or a class it's the same thing.
like so:
Code: Select all
<div id=expand_this style="display:"><table blahhadaljada></table></div>
Code: Select all
function toggle( targetId ){
target = document.getElementById( targetId );
if (target.style.display == "none"){
target.style.display = "";
} else {
target.style.display = "none";
}
}
for an example just see here and see how i use the function (it's not the cleanest example ever, i know
