I have some elements like <a class='link'>click</a> which are created after clicking on another div …
Is there any chance to make jQuery works for <a class='link'>click</a> ?
For now I’m forced to use <a onclick='func()' class='link'>click</a> … and it’s not possible to make something like alert($(this).html()) (which must pop-up the text “click”).
Thanks
You could use jQuery’s
live()method which will handle events for dynamically added elements.Or you could just bind the click like normal when you create them.