[jQuery] Re: I thought I understood threads...Works in Opera

2007-07-17 Thread Stephan Beal
On Jul 17, 2:42 pm, PragueExpat <[EMAIL PROTECTED]> wrote: > Apparently, in IE and Firefox, the function must run to completion before > the UI is updated with any CSS / DOM changes, but in Opera, the UI is > updated immediately upon the jQ call. Yeah, someone mentioned that behaviour a couple of

[jQuery] Re: I thought I understood threads...Works in Opera

2007-07-17 Thread John Resig
The problem is that there's no such thing as threads in JavaScript - the fact that Opera is actually rendering something is a bug. Your code will need to look like this: function wait(time, fn){{ $("#timer").show(); setTimeout( fn, time ); } you would call it like this: wait( 5000, function(

[jQuery] Re: I thought I understood threads...

2007-07-17 Thread PragueExpat
OK, OK, I know - I'm having a nice conversation with myself here. Just found this : http://dev.opera.com/articles/view/timing-and-synchronization-in-javascript/ Timing of Rendering Programmatic changes to the DOM or style sheet might not render immediately.

[jQuery] Re: I thought I understood threads...Works in Opera

2007-07-17 Thread PragueExpat
Sorry to be replying to my own threads, but this just gets more interesting. Apparently, in IE and Firefox, the function must run to completion before the UI is updated with any CSS / DOM changes, but in Opera, the UI is updated immediately upon the jQ call. I was trying to get a 'waiting' gif

[jQuery] Re: I thought I understood threads...(cut/paste example)

2007-07-17 Thread PragueExpat
should have posted this before - wait.html --- http://www.w3.org/TR/html4/strict.dtd";> Untitled