diff options
author | Scott Jehl <scott@scottjehl.com> | 2009-01-13 15:15:24 +0000 |
---|---|---|
committer | Scott Jehl <scott@scottjehl.com> | 2009-01-13 15:15:24 +0000 |
commit | 7ffeecefc9c89cfb9cfbe1f348f024ec1b284d29 (patch) | |
tree | af51ca81df0f79b3bee03f1b075bf3b8260cc510 /demos/slider | |
parent | ca44391e5c858aeb5025755380018012e80be868 (diff) | |
download | jquery-ui-7ffeecefc9c89cfb9cfbe1f348f024ec1b284d29.tar.gz jquery-ui-7ffeecefc9c89cfb9cfbe1f348f024ec1b284d29.zip |
fixed behavior where cursor moves faster than handle on drag - simple style toggle
Diffstat (limited to 'demos/slider')
-rw-r--r-- | demos/slider/side_scroll.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/demos/slider/side_scroll.html b/demos/slider/side_scroll.html index ffc4cb759..27dc251a3 100644 --- a/demos/slider/side_scroll.html +++ b/demos/slider/side_scroll.html @@ -13,7 +13,7 @@ .scroll-content { width: 2440px; } .scroll-content-item { width: 100px; height: 75px; float: left; margin: 10px; font-size: 3em; padding-top: 25px; text-align: center; } .scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; } - .scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; } + .scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto; } .scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; } .scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; } .scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; } @@ -34,6 +34,12 @@ //append icon to handle var handleHelper = scrollbar.find('.ui-slider-handle') + .mousedown(function(){ + scrollbar.width( handleHelper.width() ); + }) + .mouseup(function(){ + scrollbar.width( '100%' ); + }) .append('<span class="ui-icon ui-icon-grip-dotted-vertical"/>') .wrap('<div class="ui-handle-helper-parent" /></div>').parent(); |