I am quite new to jQuery plugins and I don't understand the architecture of the bootstrap-slider plugin.
What is actually returned when you create the slider?
var mySlider = $('.slider').slider({...});
I would expect the Slider class (object) but I can not access it's methods directly, instead I have to do this:
mySlider.slider('setValue',4);
Why should I call Slider's methods as string and not directly? What I would expect is:
var mySlider = $('.slider').slider({...});?
mySlider.setValue(4);
Again I am new to this, is it some kind of ugly pattern or did I understand it wrongly? Can someone please explain it please?
Thanks