[jQuery] Unable to listen to elements appended by jQuery.
Well, im trying to append childrens to a div in a administration tool
im developing. The problem is simple: I've added som html to this div
like this:
var toInsert = '<div class="menuBoxContentRow event"
name="eventRowHere">'+
'<div class="eventTitle">'+unescape($
(curEvent).find('Name').text())+'</div>' +
'<div class="eventDetail">domain: '+unescape($
(curEvent).find('Domain').text())+'</div>' +
'<div class="eventDetail">vinder fundet: '+winnerFound+'</div>' +
'</div>';
$("#eventsMenuContent").append(toInsert);
And im trying to listen for onclick events on this with
$("div[@name=eventRowHere]").click(
function()
{
alert('asdasd');
});
All this is done inside a $(document).ready(function() {}); - But it
wont work?
Do I need to tell jQuery that something has been appended?
Thanks in advance.
Regards,
Jakob Dam Jensen