February 9th, 2004, 05:22 PM
jscript css class swap buggy ?
I have the following classes defined in a a linked stylesheet...
and am swapping them with an 'onMouseOver' that is within a TD I have on my page, thusly:
onMouseOut="document.body.style.cursor='default'; this.className='side';" >
The client has reported that when putting the mouse over the td, the page behaves erratically, and the roll-over background image doesnt always appear..
Is this the best way to achieve what I want here ?
Might I need to preload the image in the 2nd class?
an example page of the above is:
Any help would be greatly appreciated.
Thank you all .
February 9th, 2004, 05:49 PM
preloading imgs seems to have sorted it..
It seems to be a little smoother now with the addition of this preloading script into my linked .js file..
//preloader for quick display
var x = new Image();
x.src = 'images/wds_side_panel_over.jpg';
var y = new Image();
y.src = 'images/svc_side_panel_over.jpg';
var z = new Image();
z.src = 'images/case_side_panel_over.jpg';
I will await conf from the client that this has nailed it.
If anyone can confirm that its all working smoothly for them at
and what browser you're using, that would be splendid, thank you.