jQuery: The Write Less, Do More JavaScript Library

UI/Slider

From jQuery JavaScript Library

Jump to: navigation, search

« Back to the jQuery UI Docs

NameType
Dependencies:

  • ui.base.js

NameType

NameType
Plugin methods:



NameType
slider( options )
Makes a slider from the nodeset supplied by the query.
slider( "moveTo", value, index ) Returns: jQuery
Moves a slider's handle to the given position.
slider( "value", index ) Returns: jQuery
Retrieves a handle's value.
slider( "disable" ) Returns: jQuery
Temporarily disables the slider.
slider( "enable" ) Returns: jQuery
Enables the slider.
slider( "destroy" ) Returns: jQuery
Completely removes the sliding functionality.

NameType
Example:
A simple jQuery UI Slider.

$("#example").slider();

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script>
  $(document).ready(function(){
    $("#example").slider();
  });
  </script>
  
</head>
<body>
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)">
<script type="text/javascript" src="http://dev.jquery.com/view/tags/ui/1.5b2/ui.base.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/tags/ui/1.5b2/ui.slider.js"></script>

<div id='example' class='ui-slider-1' style="margin:10px;">
<div class='ui-slider-handle'></div>	
</div>
</body>
</html>

NameType

NameType
Demos:

NameType