bootstrap-touchspin
bootstrap-touchspin copied to clipboard
Consider allowing user to read plugin options
Please consider allowing the user to input/update/read the plugin options on the fly. I was able to create a separate input field that would update the step setting like so:
<input id="timestep" type="text" class="form-control" value="600">
...
$("#timestep").change(function()
{
$("input").trigger("touchspin.updatesettings", {step: $("#timestep").val()});
});
I however found no way to show the boosted step value to the user. I tried to update the "timestep" input value but I could not read the step setting from the plugin itself:
$("input").trigger("touchspin.change");
{
var step = $("#timestamp").TouchSpin().data("settings", "step");
$("#timestep").val(step);
}
Is there perhaps a way to read the values of all the settings from plugin? Something like:
$("#timestamp").TouchSpin().step();
Thank you
Thanks for the suggestion, I will refactor the plugin soon and will add methods to read the settings (and I will avoid using the trigger technique).