[jQuery] Re: Binding a Click Event to Anchor Tag

2007-08-30 Thread Andy Matthews
I'm not having the exact same issue, but I am having inconsistencies with the click method. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Giant Jam Sandwich Sent: Thursday, August 30, 2007 1:42 PM To: jQuery (English) Subject: [jQuery] Binding

[jQuery] Re: Binding a Click Event to Anchor Tag

2007-08-30 Thread Giant Jam Sandwich
Turns out it was an old version of the library. On Aug 30, 1:42 pm, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote: > I used to be able to do this: > > $("a").click(function(){ >alert("test"); >return false; > > }); > > test > > It no longer works in Firefox. I read some other posts that se

[jQuery] Re: Binding a click event

2007-07-18 Thread cfdvlpr
This code works well for me except that it disables the other links on my page. What can I do to fix this?

[jQuery] Re: Binding a click event

2007-05-20 Thread Jean Nascimento
ow now undertood =p On 5/20/07, MikeR <[EMAIL PROTECTED]> wrote: It's not unbinding the click for me when I don't return false. I put the 'unbind' in there in the first place because if the function gets called again (that does the event binding)... I don't want the event handler to execute 2,

[jQuery] Re: Binding a click event

2007-05-20 Thread MikeR
It's not unbinding the click for me when I don't return false. I put the 'unbind' in there in the first place because if the function gets called again (that does the event binding)... I don't want the event handler to execute 2, 3, 4, 5... etc times instead of only once. Thanks again folks! =)

[jQuery] Re: Binding a click event

2007-05-20 Thread Jean Nascimento
with this changes works $('body').unbind('click').click(function(event) { if($(event.target).is('#test')) { alert("Returning.."); return true; } // Do whatever here. alert("Would perform some action.");

[jQuery] Re: Binding a click event

2007-05-20 Thread MikeR
Brandon, very good! Much appreciated!! =) I had to put "event" as a parameter inside of the function() {...} snippet, but yes.. that is *exactly* what I was looking for. Here is the test code in case anybody else happens to run into this problem and needs a solution: http://labs.twerq.com/

[jQuery] Re: Binding a click event

2007-05-20 Thread Jean Nascimento
I need to study more about the parameters of Jquery, i dont know the most LOL On 5/20/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: I would just check the event.target to see if it originated from the image. $('body').bind('click', function() { if ( $(event.target).is('#someId') ) return;

[jQuery] Re: Binding a click event

2007-05-20 Thread Brandon Aaron
I would just check the event.target to see if it originated from the image. $('body').bind('click', function() { if ( $(event.target).is('#someId') ) return; // short-circuit // continue on to hide div }); -- Brandon Aaron On 5/20/07, MikeR <[EMAIL PROTECTED]> wrote: Just a quick quest

[jQuery] Re: Binding a click event

2007-05-20 Thread Jean Nascimento
try $("body").children("#someid").unbind("click"); or $("body").filter("#someid, :first").unbind("click"); someone have to work LOL On 5/20/07, MikeR <[EMAIL PROTECTED]> wrote: Not sure I quite follow, sorry. The example you provided also did not work. IE throws an error "object does not su

[jQuery] Re: Binding a click event

2007-05-20 Thread MikeR
Not sure I quite follow, sorry. The example you provided also did not work. IE throws an error "object does not support this property or method." On May 20, 5:21 pm, "Jean Nascimento" <[EMAIL PROTECTED]> wrote: > $('body').not('#someid').unbind('click').click(function() { /* code > */ }); > > wit

[jQuery] Re: Binding a click event

2007-05-20 Thread Jean Nascimento
i can test *I want to say YOU can test =p On 5/20/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: $('body').not('#someid').unbind('click').click(function() { /* code */ }); with this u remove the #someid from all body elements so this unbind not work i can test $('body').children().is('#som

[jQuery] Re: Binding a click event

2007-05-20 Thread Jean Nascimento
$('body').not('#someid').unbind('click').click(function() { /* code */ }); with this u remove the #someid from all body elements so this unbind not work i can test $('body').children().is('#someid').unbind('click').click(function() { /* code */ }); if the unbind().click() sequence works, u c