I have tried to load data from external html file into div.
Like I am selecting html file from dropdown and then clicking on load button, on click it will load data of selected html file into current html and in the current html page I am having a div, in which html content are to be copied.
I can easily get content of external html file into div on button click, but problem is that content which are copied from external html to div, on that html content jquery is not working properly like draggable, resizable are not working.
How Can I resolve this error ?
My code:
$.ajax({
url: "test.html",
async: false,
dataType: "text",
success: function (data) {
console.log(data);
$(data).appendTo("#col_two");
return true;
}
});
EDIT: Code from comment below...
<div class="ui-draggable ui-resizable" style="background: none repeat scroll 0% 0% rgb(253, 23, 23); width:394px;height:210px;position:absolute; left:1084px; top: 287px;border:1px solid rgb(82, 1, 243); z-index:1;" id="rectangle_1">
<div style="z-index:1;" class="ui-resizable-handle ui-resizable-e"></div>
<div style="z-index:1;" class="ui-resizable-handle ui-resizable-s"></div>
<div style="z-index:1;" class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se"></div>
</div>
I am trying to add above code in
I am appending abovecode in ajax call into col_two, appended div whose id is "rectangle_1" is not draggalbe nor resizable