istvan-ujjmeszaros / bootstrap-touchspin

A mobile and touch friendly input spinner component for Bootstrap.
Other
500 stars 155 forks source link

Setting default options #95

Open diesl opened 6 years ago

diesl commented 6 years ago

It would be nice if it was possible to set some default options for all Touchspins of a project. I'll quote from the DataTables' Website that perfectly describes what I mean and also has some example code.

https://datatables.net/manual/options#Setting-defaults:

When on projects that use multiple DataTables it is often useful to set the initialisation defaults to common values (for example you might want to set the dom option to a common value so all tables get the same layout). This can be done using the $.fn.dataTable.defaults object. This object takes all of the same parameters as the DataTables initialisation object, but in this case you are setting the default for all future initialisations of DataTables.

So for example my Touchspins would all share the same _buttonuptxt, _buttondowntxt, _buttondownclass and _buttondownclass, while I would initialize them with different min and max values.

cuartas15 commented 6 years ago

Isn't there a solution for this yet?