Trying to bind click confirmation with jQuery (to clean code in JSF page) I understand that onclick inline function (oamSubmitForm();) written by MyFaces is executed before jQuery click() event. Is possible to do jQuery click before instead?
jQuery(".commandButtonConfirmDelete").click(function() {
var answer = confirm('Confirm Delete?');
return answer;
});
<h:commandLink styleClass="commandButtonConfirmDelete" />
<h:commandButton styleClass="commandButtonConfirmDelete" />