Olaf Bosch schrieb:
> Simon Corless schrieb:
> 
>> The link is there to test, it works before you click the div, but the
>> new link doesn't activate the .click() function and I don't know why!
>> Basically jQuery is ignoring it.
> 
> Ohohoho, i can help ;)

And I like to optimize ;-)

$("div.tags").click(function() {
     $('<a href="index.php">dynamic</a>')
         .appendTo( $(this).empty()[0] )
         .click(function () {
             alert("help");
             return false;
         });
});

Saves one expensive query and a class (".res").


:-) Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to