From c5bac6d3614181d0cca126355395647c2009fb15 Mon Sep 17 00:00:00 2001 From: ABSCent Date: Wed, 11 Nov 2015 15:47:42 +0200 Subject: [PATCH] Update jquery.range.js --- jquery.range.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jquery.range.js b/jquery.range.js index 3e7f99e..69e8d17 100644 --- a/jquery.range.js +++ b/jquery.range.js @@ -34,7 +34,8 @@ format: '%s', theme: 'theme-green', width: 300, - disable: false + disable: false, + fitBounds:false }, template: '
\
\ @@ -232,7 +233,9 @@ var width = label.html(text).width(), left = position - width / 2; - left = Math.min(Math.max(left, 0), this.options.width - width); + if(this.fitBounds){ + left = Math.min(Math.max(left, 0), this.options.width - width); + } label[animate ? 'animate' : 'css']({ left: left }); @@ -332,4 +335,4 @@ return result || this; }; -})(jQuery, window, document); \ No newline at end of file +})(jQuery, window, document);