I am trying to load dynamic content after user login using $.ajax, for example:
$.ajax({
url: "functions.php",
type: "GET",
data: login_info,
datatype: 'html',
async: false,
success: function (response) {
$('#main').html(response);
}
});
The problem is that some events do not work when loading in this way. I set the buttons using the method .live(), but the sortable list, for example, does not work. How can I somehow update the DOM and tell jquery about these newly added elements?
Thank!
source
share