If you wrap your script with a jQ ready function like below, it works fine.
Thanks for figuring this out! I was writing this code to double check my JS knowledge before implementing a similar construct in one of my applications and was scared that my coding skills might have been fundamentally flawed. The point in my app where I need this is after the DOM has loaded so I can continue my work now, but this still seems like a bad issue.

John: Now that you are working for Mozilla, is this something you are supposed to / could look into, or is this a bug report that I should report independently? I suspect it's the later, but asking doesn't hurt ; ).

-- Felix
--------------------------
http://www.thinkingphp.org
http://www.fg-webdesign.de


Franck Marcia wrote:
2007/1/3, digital spaghetti <[EMAIL PROTECTED]>:
I've just tried it in FF2.0.0.1 with Firebug 1.0b8 and I can confirm
that it runs fine when the code is pasted into Firebug, but does not
work in the browser - I get your origional results.


It seems to be a different behaviour when the dom is ready or not than
a difference between fb and scripts in page.

If you wrap your script with a jQ ready function like below, it works fine.

$(function(){
    // your code
});

But don't ask me why! :-)

Franck.

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to