How can I change the following to submit on both blur
and on submit
:
$('form').on('blur', 'input', function(event) { });
How can I change the following to submit on both blur
and on submit
:
$('form').on('blur', 'input', function(event) { });
You can pass multiple events to jQuery's on
method.
$('form').on('blur submit', function(event) { })
This would mean that whenever the $('form')
element was either a) blurred or b) submitted, the event handler would be invoked.