While attempting to disable a button in Materialize CSS using jQuery, I encountered an issue. Despite following the documentation found here, it seems that simply adding the 'disabled' class does not automatically disable the button as expected. Here is the code snippet I am working with:
HTML:
<button id='submit-btn' class="btn waves-effect waves-light submit red" type="button" name="action">
jQuery:
$('#submit-btn').off().on('click', function(){
$('#submit-btn').addClass('disabled');
});