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

Example using options object added to the demo.hml file #70

Open
billbrach opened this Issue Sep 4, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@billbrach

billbrach commented Sep 4, 2014

I'd like to see an example of how to use the options object, to pass in option settings during initialization of the slider. Could this be added to the demo.html file ??

Thanks,

Bill

@icfr

This comment has been minimized.

Show comment
Hide comment
@icfr

icfr Sep 8, 2014

$('$slider').simpleSlider({
range:[1,100],
step:1,
snap:true
})

icfr commented Sep 8, 2014

$('$slider').simpleSlider({
range:[1,100],
step:1,
snap:true
})
@shotgun469

This comment has been minimized.

Show comment
Hide comment
@shotgun469

shotgun469 Mar 10, 2015

UPDATE: I got it to init using the

selector.simpleSlider('setValue', value);

Only problem now is that it renders the slider incorrectly. As if he value would be between 10 and 20, not in the exact half as I would expect (in this case where max is 100).


I am initializing passing the object as shown by icfr, but the value is not being initialized. It starts at 0.

$('#slider').simpleSlider({
range: [0, 100],
step: 5,
highlight: true,
snap: true,
value: 50
});

Thanks,

shotgun469 commented Mar 10, 2015

UPDATE: I got it to init using the

selector.simpleSlider('setValue', value);

Only problem now is that it renders the slider incorrectly. As if he value would be between 10 and 20, not in the exact half as I would expect (in this case where max is 100).


I am initializing passing the object as shown by icfr, but the value is not being initialized. It starts at 0.

$('#slider').simpleSlider({
range: [0, 100],
step: 5,
highlight: true,
snap: true,
value: 50
});

Thanks,

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