how to get the data-id of a button in jquery code example Example: jquery get data-id const dataId = $('#elementId').attr("data-id");