How do I force Opera to redraw?

I’m creating a Tooltips script that pops open a little tooltip when you hover over certain items. It works fine in all browsers but Opera, which isn’t redrawing the page for some reason leaving the tooltips half drawn on the screen.

Links to code:

http://files.danpeverill.com/tooltips/
http://files.danpeverill.com/tooltips/javascript/tooltips.js
http://files.danpeverill.com/tooltips/css/layout.css

Thanks in advance.

Found the solution. Apparently it’s a bug and you can force Opera to redraw with this workaround:


if (window.opera)
   document.body.style += "";	// Force Opera redraw.

You can also toggle body’s position property between static and relative to achieve the same thing.

i think you can reset any css value for body, but for me its working only when i add the timeout to the second css change, like this:

function fixOperaRedraw() {
//opera hack to force redraw of whole window
if (window.opera) {
$(document.body).css(“background-color”,“#f4f4f4”);
setTimeout(function(){
$(document.body).css(“background-color”,“#f2f2f2”);
}, 10);
}
}