diff options
author | Ablay Keldibek <atomio.ak@gmail.com> | 2015-03-16 15:10:23 +0600 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-06-09 12:36:10 -0400 |
commit | f2e8471f35838c236506f96f0578281bd44e598b (patch) | |
tree | 746a4ea95ebaecb2e66b328462bdcee199228d56 /tests/visual | |
parent | ec6e10de6b8cfa9f249b07e9f5440c163ba7af67 (diff) | |
download | jquery-ui-f2e8471f35838c236506f96f0578281bd44e598b.tar.gz jquery-ui-f2e8471f35838c236506f96f0578281bd44e598b.zip |
Slider: Fix handle order when setting values of range slider to max
When both values are set to the maximum change them in descending order
Fixes #9046
Closes gh-1502
(cherry picked from commit dff1c74dd4c0fd6b951c7c183bebae09f9f229f6)
Diffstat (limited to 'tests/visual')
-rw-r--r-- | tests/visual/slider/range_slider.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/visual/slider/range_slider.html b/tests/visual/slider/range_slider.html new file mode 100644 index 000000000..2b041f377 --- /dev/null +++ b/tests/visual/slider/range_slider.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html> +<head lang="en"> + <meta charset="UTF-8"> + <title>jQuery UI Slider - Range slider</title> + <link rel="stylesheet" href="../../../themes/base/all.css"> + <style> + #wrapper { + font-family: Arial; + width: 500px; + margin: 20px auto; + } + </style> + <script src="../../../external/jquery/jquery.js"></script> + <script src="../../../ui/core.js"></script> + <script src="../../../ui/widget.js"></script> + <script src="../../../ui/mouse.js"></script> + <script src="../../../ui/slider.js"></script> +</head> +<body> +<div id="wrapper"> + <h1>Range Slider</h1> + <h3>When set both values of range slider to the maximum, slider should not lock</h3> + <div id="slider"></div> + <br> + <button id="set-max-values">set values to max</button> + <button id="set-min-values">set values to min</button> +</div> + +<script> + var el = $( "#slider" ).slider({ + range: true, + min: 0, + max: 100, + values: [ 0, 50 ] + }); + + $( "#set-max-values" ).on( "click", function() { + el.slider( "option", { values: [ 100, 100 ] } ); + }); + + $( "#set-min-values" ).on( "click", function() { + el.slider( "option", { values: [ 0, 0 ] } ); + }); +</script> +</body> +</html> |