We have code that loads html to div with class content. We have div element with link class which has data-href and some other data-* properties. The code looks like:
$(document).on('click', '.link', linkClick);
linkClick: function (event) {
event.stopPropagation();
$('.content').load($(this).data('href'), function (response, status) {
if (status == 'error') {
$('.content').html("Something went wrong. Please try again later");
}
});
}
I want to access $(this) inside this callback of load function to get values of all other data-* properties of link clicked, how can i do that?