aboutsummaryrefslogtreecommitdiffstats
path: root/demos/slider
diff options
context:
space:
mode:
authorScott Jehl <scott@scottjehl.com>2009-01-12 18:00:29 +0000
committerScott Jehl <scott@scottjehl.com>2009-01-12 18:00:29 +0000
commit204742d1dfcf6fbdb93fd8f549fc18de87cfb4b6 (patch)
tree827ed455c3c12fc36099587ace4a69079081d953 /demos/slider
parentff20a3e6a20ae166ec9747fd3d67fa634db75332 (diff)
downloadjquery-ui-204742d1dfcf6fbdb93fd8f549fc18de87cfb4b6.tar.gz
jquery-ui-204742d1dfcf6fbdb93fd8f549fc18de87cfb4b6.zip
added content panel reflowing if the handle is all the way right and the window gets wider
Diffstat (limited to 'demos/slider')
-rw-r--r--demos/slider/side_scroll.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/demos/slider/side_scroll.html b/demos/slider/side_scroll.html
index 1e8a89421..ec962c650 100644
--- a/demos/slider/side_scroll.html
+++ b/demos/slider/side_scroll.html
@@ -59,12 +59,21 @@
var percentage = Math.round(leftVal / remainder * 100);
scrollbar.slider("value", percentage);
}
+ //if the slider is 100% and window gets larger, reveal content
+ function reflowContent(){
+ var showing = scrollContent.width() + parseInt( scrollContent.css('margin-left') );
+ var gap = scrollPane.width() - showing;
+ if(gap > 0){
+ scrollContent.css('margin-left', parseInt( scrollContent.css('margin-left') ) + gap);
+ }
+ }
//change handle position on window resize
$(window)
.resize(function(){
resetValue();
sizeScrollbar();
+ reflowContent();
});
//init scrollbar size
setTimeout(sizeScrollbar,10);//safari wants a timeout