Skip to content

Instantly share code, notes, and snippets.

@bni
bni / test.html
Last active August 29, 2015 14:08
jQuery numeric plugin, allow both "," and "."
<script src="http://code.jquery.com/jquery-1.9.0.js"></script>
<script src="https://raw.githubusercontent.com/SamWM/jQuery-Plugins/master/numeric/jquery.numeric.js"></script>
<label for="integer-input">Integer</label>
<input id="integer-input" type="number" step="1" min="0" class="integer-input" value="">
<label for="numeric-input">Numeric</label>
<input id="numeric-input" type="text" class="numeric-input" value="" onkeydown="setInputFormat(event);">
<script>