[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread RwL
Not sure if this is my code's problem or Firefox's... I don't seem to be throwing any JS errors in MSIE. Here's what I'm doing: Turned on Safari's JS Console and no errors there either. Hmm.

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Erik Beeson
You don't need to wrap the parameter to not in $(...). Maybe try: $(a).not(#nav a).click(function() { alert('...'); return false; }); --Erik On 7/25/07, RwL [EMAIL PROTECTED] wrote: Not sure if this is my code's problem or Firefox's... I don't seem to be throwing any JS errors in MSIE.

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Jonathan Sharp
This could also be written as: $('a').click(function() { if ($(this).parents('#nav').size() == 0) { alert('...'); return false; } }); -js On 7/25/07, Erik Beeson [EMAIL PROTECTED] wrote: You don't need to wrap the parameter to not in $(...). Maybe try: $(a).not(#nav

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread RwL
You don't need to wrap the parameter to not in $(...). Maybe try: $(a).not(#nav a).click(function() { alert('...'); return false; }); You know, that's what I thought too, but the not selection didn't work at all until I wrapped my NOT selection with $() -- that is, #nav a was still getting

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Brandon Aaron
I get this a few times as well. Just gotta restart Firefox. -- Brandon Aaron On 7/25/07, RwL [EMAIL PROTECTED] wrote: What I'm interested in is if the recursion error still occurs with my final suggestion? --Klaus Ah, sorry Klaus -- it doesn't, but take that with a grain of salt, because

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread RwL
What I'm interested in is if the recursion error still occurs with my final suggestion? --Klaus Ah, sorry Klaus -- it doesn't, but take that with a grain of salt, because I can't reproduce the error anymore with my orignal syntax. I'm writing this off as Firebug behaving badly.

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Klaus Hartl
RwL wrote: Thanks John; thanks Klaus. Responding to Klaus: That said, $(a).not( $(#nav a) ) is not supposed to work if I understood that correctly. Having reread the spec, I agree with you, but oddly $(a).not( $ (#nav a) ) DID work as I expected it to. No matter. Your final suggestion

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Klaus Hartl
RwL wrote: You don't need to wrap the parameter to not in $(...). Maybe try: $(a).not(#nav a).click(function() { alert('...'); return false; }); You know, that's what I thought too, but the not selection didn't work at all until I wrapped my NOT selection with $() -- that is, #nav a was

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread RwL
Thanks John; thanks Klaus. Responding to Klaus: That said, $(a).not( $(#nav a) ) is not supposed to work if I understood that correctly. Having reread the spec, I agree with you, but oddly $(a).not( $ (#nav a) ) DID work as I expected it to. No matter. Your final suggestion works too. And the