form-default-submit
v1.0.2
Published
Make possible to choose, which submit will be used as default with <enter> key.
Downloads
32
Readme
form-default-submit
In case of more submit inputs, browser will default submit first of them. Sometimes the submit inputs are dynamically generated and we need to set as default another submit (not the first one).
Everything what you need to do is import this library into html code after jquery and set default attribute to that submit, which you want to set as default:
<input type="submit" name="submit1" />
<input type="submit" name="submit2" />
<input type="submit" name="submit3" default="" />
// add default attribute<input type="submit" name="submit4" />