Install
Manual install:
- Download inputhistory.js
- Include source:
<script src="inputhistory.js"></script>
Usage
To enable history on your inputs:
$(".input").inputhistory();
Prevent form submit
Normally, if your input is inside a form, it will trigger submit when pressing <enter>
. If you don't want this behaviour you can turn it off with this option:
$(".input").inputhistory({preventSubmit: true});
Requirements
inputhistory
is a jQuery plugin and requires jQuery 1.8 or higher.
License
Available under the MIT license.