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

No such method 'options' for slider widget instance #111

Open
tonyflo opened this issue Jul 10, 2017 · 1 comment
Open

No such method 'options' for slider widget instance #111

tonyflo opened this issue Jul 10, 2017 · 1 comment

Comments

@tonyflo
Copy link

tonyflo commented Jul 10, 2017

I have a slider, where initially A through E are displayed:

var letters = ["A", "B", "C", "D", "E", "F"];
var minVal = 1;
var maxVal = 5;
$("#my-slider")
    .slider({
        range: true,
        min: minVal,
        max: maxVal,
        values: [minVal, maxVal],
    })
    .slider("pips", {
        rest: "label",
        labels: letters.slice(minVal-1, maxVal),
    });

I try to programmatically add "F" to the slider by following the Refresh Method at http://simeydotme.github.io/jQuery-ui-Slider-Pips/#refreshing by doing the following:

$("#my-slider")
    .slider("options", "max", 6 )
    .slider("pips", "refresh");

But in doing so, I get this JQuery error:

Uncaught Error: no such method 'options' for slider widget instance

According to the example, there is an "options" property for the slider object. Am I doing something wrong here?

@simeydotme
Copy link
Owner

I am so sorry, my documentation was wrong :(


it should be:

.slider( "option", "max", 6 )

not:

.slider( "options", "max", 6 )

http://jsfiddle.net/1mpsovjh/1/


If you want to submit a pull-request to fix the docs, please do... otherwise I'll get around to it soon :)

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

No branches or pull requests

2 participants