Can I customize the input field for the amounts using the + buttons?

Is it possible with jQuery and CSS to create such an input field?

Amount

I'm not sure where to start, any help is much appreciated!

Thanks in advance!

+4
source share
3 answers

Here is a simple jQuery based method.

http://jsfiddle.net/acodesmith/aykZs/3/

Buttons are not righteous, just showing what can be done. Part of the import is the parent div.step.

EDIT: Updated buttons http://jsfiddle.net/EK9vA/

+2
source

Using HTML 5, some browsers support this:

<input type="number" name="points" step="1" /> 

See the demo here: http://jsfiddle.net/Gsk4f/ (Chrome or Opera)

This is a new HTML 5 attribute and is not supported by all browsers.

+2
source
+1
source

Source: https://habr.com/ru/post/1392994/


All Articles