jquery get value of custom data attribute code example
Example 1: jquery get data attribute
link
var id = $(this).data("id"); // Will set id to 123
Example 2: data id tag
var dataId = $(this).attr("data-id");
link
var id = $(this).data("id"); // Will set id to 123
var dataId = $(this).attr("data-id");