javascript get button with data-id atribute code example Example: data id tag var dataId = $(this).attr("data-id");