I've got a script which produces a slide down notification at the top of the screen, which is called using showMessage('warn', 'This is a warning message').
It used to use showMessage('warn'); which would be enough for it to show the normally hidden div. The thing is that I've converted the script to accept a dynamic message, passed as a parameter. That works, but not perfectly.
It's complicated by the animation which runs to slide the message on and off the screen. This involves calculating the height of the div, which could be done before, when the div contained static HTML, but now the div is actually empty and is only populated with a message when called, the calculation fails. I think this is because outerHeight() can't detect the presence of the dynamic HTML.
I've got a fiddle here
http://jsfiddle.net/KHkW7/30/ Any suggestions would be greatly appreciated! Thanks.
Peter
A Linux Admin
Willing to help maintain Linux servers remotely for a tiny consideration into my Paypal account :-)