Slider Methods

Description

The slider plugin has the following methods:

enable/disable

enable: enable a disabled slider or switch control.

$("#element1" ).slider( "enable" );

disable: disable a slider or switch control.

$( "#element1" ).slider( "disable" );

refresh

refresh: update a custom slider or switch control.

refresh method updates the slider to reflect the changes we made.

For instance, we can dynamically update our switch or slider and call "refresh" to rebuild the control.


// Set   the switch to "on"   and  refresh it 
var switch = $(  "#switch1" ); 
switch[0].selectedIndex  = 1;
switch.slider(  "refresh" );

// Maximize  the slider's  volume  control and  refresh it
$("#volume").val(5).slider( "refresh" );





















Home »
  jQuery Mobile »
    Tutorial »




jQuery_Mobile
Form
List
Layout
Theme