Thread
: jQuery
Registering an element into the DOM
View Single Post
03-22-2009, 08:51 PM
PM User
|
#
2
Eldarrion
Regular Coder
Join Date: Feb 2009
Location: Wheeling, IL
Posts: 358
Thanks: 5
Thanked 62 Times in 60 Posts
Try the following:
Code:
$(".editbtn").live('click', function() { alert("got clicked"); });
Should do the trick. And of course, if you want to remove the event at some point...
Code:
$(".editbtn").die('click');
Enjoy.
__________________
The way to success is to assume that there are no impossible things. After all, if you think something is impossible, you will not even try to do it.
How to ask smart questions?
Users who have thanked Eldarrion for this post:
Fumigator
(04-03-2009)
Eldarrion
View Public Profile
Find More Posts by Eldarrion