What is more efficient between these two sets, and why. Thanks :)
<button data-target="1" class="target-buttons'>Target</button>
$(document).on('click', '.target-buttons', function() {
alert($(this).data('target'));
});
<button onclick="alertTarget('1')" class="target-buttons">Target</button>
function alertTarget(value) {
alert(value);
}
Thanks very much!