in jQuery, how do i load an generated HTML and do some manipulation to it?
First: load my HTML from another page:
$.post("my_page.php?operation=show_data&session=<?php echo SESSION_UUID;?>",
function(data){
$("#data-table").empty().append();
}
);
now, i can’t do the following:
//the .preview-table is in the appended HTML
$(".preview-table").dataTable( {}); // this is a plugin jQuery plugin
and yes i’ve read that i can use .live() but then it works on events only…
how do i load the plugin to the selector properly?
DataTable plugin: http://datatables.net/
1 Answer