After learning asynchronous communication using jQuery, press the submit button and after the event fires Here's how to enable the submit button to be disabled.
$('#hoge').prop('disabled', false);
What I found after investigating
--Disabled is set by default in Rails ver5.0 or later (to prevent repeated hits, etc.) ――There are other methods that can be effective
For example
$('#hoge').attr('disabled', false);
I tried it with my code and both worked
Next time, I will investigate methods such as prevention of repeated hits and make it usable
When asynchronous communication can be handled freely, many dynamic elements can be created in a small number of view files. I can take it in and the response seems to be quick, so even myself who has just learned programming I felt it was attractive.
Difficult but interesting
Recommended Posts