Fork me on GitHub

What?

Draggable-number.js is a minimal numeric input. It replace the input with a draggable text span, allowing quick number change with the mouse. Clicking on the text will display an input so that you can define an exact number.

Usage

Download draggable-number.min.js and add it to your html. Then simply call `new DraggableNumber(element);` and you are set.

                    
<input class="numeric-input" value="42" />
<script src="dist/draggable-number.min.js"></script>
<script>
  new DraggableNumber(document.getElementsByClassName('numeric-input')[0]);
</script>
                

License

Licensed under the MIT License.

Share this on: