[jQuery] Re: $('#foo') failing

2007-09-22 Thread John Resig
You're forgetting to use $(document).ready(function(){ ... }); around our code, causing it to execute too early (and, thus, work in Firebug since it's executing very late). --John On 9/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have a webapp that uses JQuery (version 1.2) for doin

[jQuery] Re: $('#foo') failing

2007-09-22 Thread [EMAIL PROTECTED]
The problem happens with all browsers, including Firefox. But the bug does not happen on Firefox *if* I'm debugging with Firebug. The instance of $('#foo') that fails executes correctly 99% of the time and then fails in one particular case. In the case that it fails, the DOM node is clearly vis

[jQuery] Re: $('#foo') failing

2007-09-20 Thread Peter Bengtsson
So it works in Firefox but the "bug happens on all browsers"?? Are you sure the element with that ID is part of the DOM tree and not something that is pasted in as "text" by ajax. $('#foo') does work in jQuery 1.2 On 9/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have a webapp that u