[jQuery] using jqModal - problem with executing jqm with triggers loaded in via AJAX

[jQuery] using jqModal - problem with executing jqm with triggers loaded in via AJAX


hello,
just when i thought i had a grip on executing jquery functions from
content that was loaded via ajax and added to the dom dynamically, i
have this issue with jqModal.
i'm trying to open a modal window from code that was loaded in via
Javascript. so i use the following, this works on most of my code ...
but this is weird, it will not fire but will trigger the alert. i
tried it without - trigger: '.triggerit' - and that doesn't work
either.
now, if the content that triggers the jqmodal is already part of the
dom and not an ajax call, it will work but i need to click it twice!
i'm confused, any ideas?
here's the code ...
$('body').click(function(event) {
if ($(event.target).is('.triggerit')) {
alert("Hi!");
$('#overlay').jqm({ajax: '@href', overlay:80, trigger:
'.triggerit'});
return false;
}
});