[jQuery] onClick event on content loaded by ajax

[jQuery] onClick event on content loaded by ajax


Hi there,
I couldn't find any solutions for my problem, so I'm asking here. I
have a form that was previously loaded by ajax and which I want to
submit also with ajax.
unfortunately, the jQuery(document).ready function has been executet
before the form was loaded, and so the event handler onClick for the
submit link isn't called when I click on the button in the form.
So,
jQuery("#submit-register-form").click(function() {
alert('yay');
}
doesn't work if the form has been loaded by ajax, but does work if I
load it on site load.
How can I solve this?
Regards,
Oli