Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider allowing user to read plugin options #50

Open
N4M3Z opened this issue Jun 26, 2015 · 1 comment
Open

Consider allowing user to read plugin options #50

N4M3Z opened this issue Jun 26, 2015 · 1 comment

Comments

@N4M3Z
Copy link

N4M3Z commented Jun 26, 2015

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

@istvan-ujjmeszaros
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants