[jQuery] how to insert html returned from ajax request into dom
I am new to jquery,
I have a page that gets data in the form of html returned from an ajax
call. I want this data to be sticked to DOM and behave asif it was
always a part of the first loaded contents.
Detail
<div id="ajaxReturnedDataDiv">****html data comes here</div>
html data
<a href="#" id="toBeClicked">show an alert</a>
$(document).ready(function() {
$("ajaxReturnedDataDiv# > a").click(function() {
alert($(this));
});
});
can anybody tell me whats the issue in this code.
Thanks in advance