There is a form with such a button:
<button class="btn btn-lg btn-primary btn-block enter" type="submit"> Войти <img src="{{ asset('img/loading.gif') }}" class="img-loader" width="16" height="16" style="display: none;" alt=""> </button> And the code:
(function($, undefined) { $('.enter').on('submit', function() { $('.img-loader').css('display', 'inline'); $('.enter').prop('disabled', 'disabled'); }); })(jQuery); There are only two fields on the form: login and password (required). It is necessary that the styles work at the submit event. Tried to change submit to click - everything works as it should. How to solve this problem?