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
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
This code works well for me except that it disables the other links on
my page. What can I do to fix this?
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,
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! =)
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.");
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/
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;
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
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
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
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
$('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
13 matches
Mail list logo