<form id="form">
<button class="" type="submit" id="submit" data-type="normal-pay">
</button>
<br><br>
<button class="" type="submit" id="quick-pay-button" data-type="quick-pay">
</button>
</form>
$("-sharpform").on("submit", (event) => {
event.preventDefault();
var type = event.currentTarget.dataset.type;
can I get the data-type value from the custom button in this way?
even if it"s all the same submit function?
or is there a better way? The purpose of
is that I want to get several different button values and do different things in the same list.
because I found that if you want to catch data-type, you have to be on form