I am trying to get the value of the attribute 'data-tablename'.
$.ajax({
type: 'post',
url: "<?= base_url(); ?>table/moveTable/",
data: "table_name=" + $(this).attr("data-tablename"),
success: function(r) {
$.notify($(this).attr("data-tablename") + " was successfully added", "success");
}
});
When I try this code, I get the message "undefined was successfully added"
How can I get the value of it?