We have the following code which seems to work just fine in every browser except IE:
var d = $('<img src="spinner.gif"/>');
d.dialog({modal:true});
In IE it seems to work just fine except the spinner doesn't spin (it's an animated GIF).
What's going on?
I have experience the same issue. Got it sorted setting the src just before opening the dialog.
Jscript
I'm doing something like this:
Perhaps performing the actions on a containment div (as opposed to the content itself) would do the trick. I've never had a problem displaying a a modal div with an animated gif.
I tried "everything" but animation.gif spinner did not work in jQueryUI modal dialog box. Some browsers were fine but it was Firefox refusing to work. Go figure whats the reason. Then found this super excellent non-img spinner component. Give all credits to fgnass.
(NOTE: At the end of this post I have edited a new answer fixing animation.gif problem)
http://fgnass.github.com/spin.js/
http://twitter.com/fgnass
I have run Firefox, IE8, Chrome, Opera, Android tablet (stock and firefoxbeta), Nokia Lumia800, Nokia C7 browsers. All works fine.
Edit 1 (use gif animation) This is how I was able to fix spinner.gif not animated on some browsers. Trick is to keep spinner div visible state at html page load. Hide it first thing in the jQuery init function. Then you may show+hide spinner div anytime you like and its animated.