1//get data-id attribute in plain Javascript
2var element = document.getElementById('myDivID');
3var dataID = element.getAttribute('data-id');
4
5//get data-id using jQuery
6var dataID = $('myDivID').data('data-id');
7
1$(document).on('click', '.class_name', function () {
2
3 var var_name = $(this).attr('attribute_name');
4 console.log(var_name)
5
6})