-
Notifications
You must be signed in to change notification settings - Fork 5
Methods
Edgar Gonzalez edited this page Jun 3, 2013
·
10 revisions
This is the list of methods that you can call on the jQuery Rambling Slider.
Any of the methods can be called as follows:
- If you want to get a value or a call a routine: ``` javascript $('#slider').ramblingSlider('method') ```
- If you want to set a value: ``` javascript $('#slider').ramblingSlider('method', value) ```
- If you want to set the value for an option: ``` javascript $('#slider').ramblingSlider('option', optionName, value) ```
Take into account that if the slider is not initialized or does not exist, it will throw an error with a Tried to call method 'method' on element without slider
message. Also, if the method is not valid, it will throw an error with a Method 'method' not found
message.
The available methods are:
Method | Description |
---|---|
stop | Stop the slider. |
start | Start/continue the slider. |
option | Get the value for an option. Set the value for an option or a group of options. |
effect | Changes the slider effects to run. See Options for the list of possible values. |
theme | Changes the slider's theme, adding a class like theme-[name] , where [name] is the theme name passed. |
previousSlide | Goes to the previous slide using any of the available transitions. |
nextSlide | Goes to the next slide using any of the available transitions. |
slide | Goes to the specified slide, which is expected to be a Number , using any of the available transitions. |
destroy | Destroys the rambling slider. |