jquery on click get this name code example Example: using this to get name of the clicked element var clickedBtnID = $(this).attr('id');