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.
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.
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
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
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
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.
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
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
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
9 matches
Mail list logo