aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2016-09-02 10:21:25 -0400
committerScott González <scott.gonzalez@gmail.com>2016-09-13 08:41:33 -0400
commit51461d523868c168f2e12eeb547c1cf8b7cf59cf (patch)
tree152e7c29153c4ef8d69444a39a3e1a2172fca2ea /demos
parent57bff499deb880dd500be503231853c97b317234 (diff)
downloadjquery-ui-51461d523868c168f2e12eeb547c1cf8b7cf59cf.tar.gz
jquery-ui-51461d523868c168f2e12eeb547c1cf8b7cf59cf.zip
Slider: Add demo for custom handle
Fixes #15023 Closes gh-1740
Diffstat (limited to 'demos')
-rw-r--r--demos/slider/custom-handle.html42
-rw-r--r--demos/slider/index.html1
2 files changed, 43 insertions, 0 deletions
diff --git a/demos/slider/custom-handle.html b/demos/slider/custom-handle.html
new file mode 100644
index 000000000..11192f318
--- /dev/null
+++ b/demos/slider/custom-handle.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>jQuery UI Slider - Custom handle</title>
+ <link rel="stylesheet" href="../../themes/base/all.css">
+ <link rel="stylesheet" href="../demos.css">
+ <style>
+ #custom-handle {
+ width: 3em;
+ height: 1.6em;
+ top: 50%;
+ margin-top: -.8em;
+ text-align: center;
+ line-height: 1.6em;
+ }
+ </style>
+ <script src="../../external/requirejs/require.js"></script>
+ <script src="../bootstrap.js">
+ var handle = $( "#custom-handle" );
+ $( "#slider" ).slider({
+ create: function() {
+ handle.text( $( this ).slider( "value" ) );
+ },
+ slide: function( event, ui ) {
+ handle.text( ui.value );
+ }
+ });
+ </script>
+</head>
+<body>
+
+<div id="slider">
+ <div id="custom-handle" class="ui-slider-handle"></div>
+</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>
diff --git a/demos/slider/index.html b/demos/slider/index.html
index 1bc1198c4..f853a79aa 100644
--- a/demos/slider/index.html
+++ b/demos/slider/index.html
@@ -18,6 +18,7 @@
<li><a href="range-vertical.html">Vertical range slider</a></li>
<li><a href="multiple-vertical.html">Multiple sliders</a></li>
<li><a href="colorpicker.html">Simple colorpicker</a></li>
+ <li><a href="custom-handle.html">Custom handle</a></li>
</ul>
</body>