Brian Campbell wrote:
> I was eyeing those, just wasn't sure how to use them. The problem is i have
> almost no experience with classes in JS (If this was PHP i'd be fine :). So,
> i've initialized the slider using the following code, and it's working
> great...
>
> new Control.Slider('mthumb','mslider',{
> range:$R(0,100),
> onSlide:function(v){do something...},
> onChange:function(v){do something...}
> });
new() will return an object. Sometimes you don't need it. But in this case you
do.
> But, once it's initialized, what's the syntax to call the setValue() and
> setValueBy() functions? Is it just Control.Slider.setValue()? I have more
> than one slider on the page so i'm guessing there must be a way to
> differentiate?
No, get the object back and then call it's setValue() and setValueBy() methods.
var slider = new Control.Slider(...);
slider.setValue(...);
--
Michael Peters
Developer
Plus Three, LP
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---