Build jQuery UI Slider - Default functionality in JavaScript

Description

The following code shows how to build jQuery UI Slider - Default functionality.

Example


<!-- Revised from demo code on http://jqueryui.com/ -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" >
<title>jQuery UI Slider - Default functionality</title>
<title>jQuery UI Selectable - Serialize</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<!--from w  w  w. j a  va 2s  . c  o  m-->
<script>
$(function() {
$( "#slider" ).slider();
});
</script>
</head>
<body>

<div id="slider"></div>

<div class="demo-description">
<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.</p>
</div>
</body>
</html>

Click to view the demo

The code above generates the following result.

Build jQuery UI Slider - Default functionality in JavaScript