I have been using blockUI to avoid browser incompatibilies on disabled or hidden buttons.
http://malsup.com/jquery/block/#element
Then my buttons have a class autobutton:
$(".autobutton").click( function(event) { var nv = $(this).html(); var nv2 = '<span class="fa fa-circle-o-notch fa-spin" aria-hidden="true"></span> ' + nv; $(this).html(nv2); var form = $(this).parents('form:first'); $(this).block({ message: null }); form.submit(); }); Then a form is like that:
<form> .... <button class="autobutton">Submit</button> </form>