I'm thinking you may not need to edit expando at all. Just attach events to the expanding elements that change their styles as indicated by your detection scheme:
Code:
<img src="some.jpg" class="expando"
onmouseover="if(whatever detects needs expand down){
this.style.top = whatever; this.style.bottom = '';
} else {
this.style.top = '';this.style.bottom = whatever;
}">
The order may need to be reversed, as I'm unsure of your layout and of how you are achieving your results. As long as the top or bottom don't need to be updated while expando is expanding/contracting, the above should be fine. That is to say, if we can set one value at the onset of expansion, the above will be good. If we have to change the top or bottom value at each increment of the expansion/contraction process, there is probably a better way to lay it out in the first place. But if we must we can integrate it into the script, might get choppy on some browsers though, all those calculations and screen updates going on at once.
The event could probably be attached more elegantly. Try this idea out on one image, if it works I'll see if I can write it up as a document listener that will work off the expando or any other class of your choosing. But I'd need your detection routine, preferably a link to your page.
I should probably have a link to the page anyway:
Please post a link to a page on your site that contains the problematic code so we can check it out.
Bookmarks