Google Groups Home
Help | Sign in
Binding click handler fails on newly created Element
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Klaus Hartl  
View profile
 More options Feb 13 2007, 12:58 pm
From: Klaus Hartl <klaus.ha...@stilbuero.de>
Date: Tue, 13 Feb 2007 18:58:25 +0100
Local: Tues, Feb 13 2007 12:58 pm
Subject: [Dev] Binding click handler fails on newly created Element
The following code for binding a click event handler on a newly created
anchor fails:

// Fails in jQuery 1.1:
$('<a href="#">I am here</a>').prependTo('#test').bind('click',
function() { return false; });

// Workaround:
$('#test').prepend('<a href="#">I am here</a>').find('a').bind('click',
function() { return false; });

Created ticket:
http://jquery.com/dev/bugs/bug/953/

-- Klaus


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brandon Aaron  
View profile
 More options Feb 13 2007, 1:01 pm
From: "Brandon Aaron" <brandon.aa...@gmail.com>
Date: Tue, 13 Feb 2007 12:01:25 -0600
Local: Tues, Feb 13 2007 1:01 pm
Subject: Re: [Dev] Binding click handler fails on newly created Element
I wonder if this is related to #921. http://jquery.com/dev/bugs/bug/921/

--
Brandon Aaron

On 2/13/07, Klaus Hartl <klaus.ha...@stilbuero.de> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google