bootstrap-touchspin icon indicating copy to clipboard operation
bootstrap-touchspin copied to clipboard

multiple touchspin instances with one initialize?

Open MartinP7r opened this issue 10 years ago • 1 comments

would it be possible to initialize the touchspin once and have it being the same for every instance of the target element (e.g. by class)?

something like:

$("input.classname").TouchSpin({
    min: 1,
    max: 999,
    stepinterval: 50,
    maxboostedstep: 10000000
});

I tried around, but all attempts led to a broken touchspinner, so far.

MartinP7r avatar Feb 10 '15 07:02 MartinP7r

Try this one, should work:

$("input[class='classname']").TouchSpin({
    min: 1,
    max: 999,
    stepinterval: 50,
    maxboostedstep: 10000000
});

piMyHome avatar Apr 07 '16 17:04 piMyHome