@@ -158,7 +159,8 @@
});
$('#testDiv4').slimscroll({
- railVisible: true
+ railVisible: true,
+ railBorderRadius: 0
});
$('#testDiv5').slimscroll({
From 41b13f6508e0ce60a8948c8e6840e1b8d2590f73 Mon Sep 17 00:00:00 2001
From: "@rochal"
Date: Sun, 18 Aug 2013 17:05:59 +1000
Subject: [PATCH 08/46] Bump-up version, remove commented out code
---
jquery.slimscroll.js | 29 +++++++----------------------
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index e27cc80..2ea5b08 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.2.0
+ * Version: 1.3.0
*
*/
(function($) {
@@ -40,7 +40,7 @@
alwaysVisible : false,
// check if we should hide the scrollbar when user is hovering over
- disableFadeOut: false,
+ disableFadeOut : false,
// sets visibility of the rail
railVisible : false,
@@ -71,12 +71,12 @@
// scroll amount applied when user is using gestures
touchScrollStep : 200,
-
+
// sets border radius
borderRadius: '7px',
-
+
// sets border radius of the rail
- railBorderRadius: '7px'
+ railBorderRadius : '7px'
};
var o = $.extend(defaults, options);
@@ -207,28 +207,13 @@
me.parent().append(bar);
me.parent().append(rail);
- // make it draggable
- // if (o.railDraggable && $.ui && typeof($.ui.draggable) == 'function')
- // {
- // bar.draggable({
- // axis: 'y',
- // containment: 'parent',
- // start: function() { isDragg = true; },
- // stop: function() { isDragg = false; hideBar(); },
- // drag: function(e)
- // {
- // // scroll content
- // scrollContent(0, $(this).position().top, false);
- // }
- // });
- // }
// make it draggable and no longer dependent on the jqueryUI
if (o.railDraggable){
bar.bind("mousedown", function(e) {
var $doc = $(document);
isDragg = true;
t = parseFloat(bar.css('top'));
- pageY = e.pageY;
+ pageY = e.pageY;
$doc.bind("mousemove.slimscroll", function(e){
currTop = t + e.pageY - pageY;
@@ -283,7 +268,7 @@
me.bind('touchmove', function(e){
// prevent scrolling the page if necessary
- if(!releaseScroll)
+ if(!releaseScroll)
{
e.originalEvent.preventDefault();
}
From 1b202263cc2f1c641e5f39bb47726126da456e3a Mon Sep 17 00:00:00 2001
From: "@rochal"
Date: Sun, 18 Aug 2013 17:06:09 +1000
Subject: [PATCH 09/46] Add minified source
---
jquery.slimscroll.min.js | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index dd63f62..26220d6 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,14 +2,15 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.2.0
+ * Version: 1.3.0
*
*/
-(function(e){jQuery.fn.extend({slimScroll:function(h){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200},h);this.each(function(){function s(d){if(q){d=d||window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/
-120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&k(c,!0);d.preventDefault&&!m&&d.preventDefault();m||(d.returnValue=!1)}}function k(d,e,h){var f=d,g=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),g),f=0=b.outerHeight()?m=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function n(){a.alwaysVisible||(x=setTimeout(function(){if((!a.disableFadeOut||!q)&&!v&&!w)c.fadeOut("slow"),g.fadeOut("slow")},1E3))}var q,v,w,x,z,r,j,y,B=30,m=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var l=b.scrollTop(),c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);u();if(e.isPlainObject(h)){if("height"in
-h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var p=b.parent().parent().height();b.parent().css("height",p);b.css("height",p)}if("scrollTo"in h)l=parseInt(a.scrollTo);else if("scrollBy"in h)l+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}k(l,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;l=e("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
-width:a.width,height:a.height});var g=e("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.size,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.size,BorderRadius:a.size,MozBorderRadius:a.size,WebkitBorderRadius:a.size,
-zIndex:99}),p="right"==a.position?{right:a.distance}:{left:a.distance};g.css(p);c.css(p);b.wrap(l);b.parent().append(c);b.parent().append(g);a.railDraggable&&(e.ui&&"function"==typeof e.ui.draggable)&&c.draggable({axis:"y",containment:"parent",start:function(){w=!0},stop:function(){w=!1;n()},drag:function(){k(0,e(this).position().top,!1)}});g.hover(function(){t()},function(){n()});c.hover(function(){v=!0},function(){v=!1});b.hover(function(){q=!0;t();n()},function(){q=!1;n()});b.bind("touchstart",
-function(a){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){b.originalEvent.preventDefault();b.originalEvent.touches.length&&k((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0)});"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),k(0,!0)):"top"!==a.start&&(k(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());A();u()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
\ No newline at end of file
+(function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d||
+window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),
+c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("").addClass(a.wrapperClass).css({position:"relative",
+overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var g=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
+"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
+b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
+(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
\ No newline at end of file
From 9049771db559d8e89426df154aa1a065b00fc61b Mon Sep 17 00:00:00 2001
From: "@rochal"
Date: Sun, 18 Aug 2013 17:20:44 +1000
Subject: [PATCH 10/46] Update version in package file.
---
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 2 +-
slimScroll.jquery.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 2ea5b08..0f07908 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.0
+ * Version: 1.3.1
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 26220d6..3071977 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.0
+ * Version: 1.3.1
*
*/
(function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d||
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
index 41174e6..1559a47 100644
--- a/slimScroll.jquery.json
+++ b/slimScroll.jquery.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.2.0",
+ "version" : "1.3.1",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
From e7b34a43ea49e9c7fe1cd0f8ecfb32234a345539 Mon Sep 17 00:00:00 2001
From: sovanna
Date: Tue, 3 Sep 2013 11:59:13 +0200
Subject: [PATCH 11/46] allow slimscroll to resize calling .slimscroll() again
---
jquery.slimscroll.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 0f07908..bb9e053 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -115,6 +115,10 @@
var height = me.parent().parent().height();
me.parent().css('height', height);
me.css('height', height);
+ } else if ('height' in options) {
+ var h = options.height;
+ me.parent().css('height', h);
+ me.css('height', h);
}
if ('scrollTo' in options)
From 83bc441dafaecea12c173a2bbc28d15ef39c6b43 Mon Sep 17 00:00:00 2001
From: "@rochal"
Date: Fri, 27 Dec 2013 17:52:06 +1100
Subject: [PATCH 12/46] Fixing issue #116 - incorrect height for multiple class
selectors.
---
examples/multiple-elements.html | 11 +++++++++--
jquery.slimscroll.js | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/examples/multiple-elements.html b/examples/multiple-elements.html
index 6f98b32..8923825 100644
--- a/examples/multiple-elements.html
+++ b/examples/multiple-elements.html
@@ -14,6 +14,7 @@
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus, felis interdum condimentum consectetur, nisl libero elementum eros, vehicula congue lacus eros non diam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus mauris lorem, lacinia id tempus non, imperdiet et leo. Cras sit amet erat sit amet lacus egestas placerat. Aenean ultricies ultrices mauris ac congue. In vel tortor vel velit tristique tempus ac id nisi. Proin quis lorem velit. Nunc dui dui, blandit a ullamcorper vitae, congue fringilla lectus. Aliquam ultricies malesuada feugiat. Vestibulum placerat turpis et eros lobortis vel semper sapien pulvinar.
Pellentesque rhoncus aliquet porta. Sed vel magna eu turpis pharetra consequat ut vitae lectus. In molestie sollicitudin mi sit amet convallis. Aliquam erat volutpat. Nullam feugiat placerat ipsum eget malesuada. Nulla facilisis nunc non dolor vehicula pretium. Sed dui magna, sodales id pharetra non, ullamcorper eu sapien. Mauris ac consectetur leo. Mauris consequat, lectus ut bibendum pulvinar, leo magna feugiat enim, eu commodo lacus sem vel ante. Sed tempus metus eget leo mollis vulputate. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
@@ -31,6 +32,8 @@
Nulla rhoncus elementum convallis. Mauris condimentum aliquet egestas. Ut iaculis nisi eget tellus accumsan venenatis. Maecenas imperdiet aliquam porta. Aenean ultrices dolor sed quam laoreet varius. Curabitur condimentum blandit erat, quis accumsan eros interdum vitae. Curabitur ligula arcu, sollicitudin vitae iaculis sed, blandit sit amet enim. Morbi ullamcorper, metus vel mollis tristique, arcu turpis malesuada nisi, at dignissim lorem odio a orci. Proin ultrices, ipsum ut vestibulum interdum, libero felis auctor mi, vitae convallis nisl justo ac tellus. Integer nec lacinia turpis. Etiam massa nisl, rhoncus quis rutrum in, pretium eu leo. Proin a velit ut nulla laoreet vestibulum. Curabitur eu elit vitae felis auctor tincidunt. Curabitur tincidunt, metus sed sollicitudin cursus, quam elit commodo erat, ut tempor erat sapien vitae velit. Morbi nec viverra erat.
Nullam scelerisque facilisis pretium. Vivamus lectus leo, commodo ac sagittis ac, dictum a mi. Donec quis massa ut libero malesuada commodo in et risus. Fusce nunc dolor, aliquet vel rutrum in, molestie sit amet massa. Aliquam suscipit, justo a commodo condimentum, enim sapien fringilla ante, sed lobortis orci lectus in ante. Donec vel interdum est. Donec placerat cursus lacus, eu ultricies nisl tincidunt a. Fusce libero risus, sagittis eleifend iaculis aliquet, condimentum vitae diam. Suspendisse potenti. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin leo purus, sodales a venenatis luctus, faucibus ac enim. Sed id metus ac sem lobortis pretium. Mauris faucibus tempor scelerisque. Nunc vulputate interdum tortor, non tincidunt dui condimentum eget. Aenean in porttitor velit. Nam accumsan rhoncus risus id consectetur.
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus, felis interdum condimentum consectetur, nisl libero elementum eros, vehicula congue lacus eros non diam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus mauris lorem, lacinia id tempus non, imperdiet et leo. Cras sit amet erat sit amet lacus egestas placerat. Aenean ultricies ultrices mauris ac congue. In vel tortor vel velit tristique tempus ac id nisi. Proin quis lorem velit. Nunc dui dui, blandit a ullamcorper vitae, congue fringilla lectus. Aliquam ultricies malesuada feugiat. Vestibulum placerat turpis et eros lobortis vel semper sapien pulvinar.
Pellentesque rhoncus aliquet porta. Sed vel magna eu turpis pharetra consequat ut vitae lectus. In molestie sollicitudin mi sit amet convallis. Aliquam erat volutpat. Nullam feugiat placerat ipsum eget malesuada. Nulla facilisis nunc non dolor vehicula pretium. Sed dui magna, sodales id pharetra non, ullamcorper eu sapien. Mauris ac consectetur leo. Mauris consequat, lectus ut bibendum pulvinar, leo magna feugiat enim, eu commodo lacus sem vel ante. Sed tempus metus eget leo mollis vulputate. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
@@ -48,6 +51,8 @@
Nulla rhoncus elementum convallis. Mauris condimentum aliquet egestas. Ut iaculis nisi eget tellus accumsan venenatis. Maecenas imperdiet aliquam porta. Aenean ultrices dolor sed quam laoreet varius. Curabitur condimentum blandit erat, quis accumsan eros interdum vitae. Curabitur ligula arcu, sollicitudin vitae iaculis sed, blandit sit amet enim. Morbi ullamcorper, metus vel mollis tristique, arcu turpis malesuada nisi, at dignissim lorem odio a orci. Proin ultrices, ipsum ut vestibulum interdum, libero felis auctor mi, vitae convallis nisl justo ac tellus. Integer nec lacinia turpis. Etiam massa nisl, rhoncus quis rutrum in, pretium eu leo. Proin a velit ut nulla laoreet vestibulum. Curabitur eu elit vitae felis auctor tincidunt. Curabitur tincidunt, metus sed sollicitudin cursus, quam elit commodo erat, ut tempor erat sapien vitae velit. Morbi nec viverra erat.
Nullam scelerisque facilisis pretium. Vivamus lectus leo, commodo ac sagittis ac, dictum a mi. Donec quis massa ut libero malesuada commodo in et risus. Fusce nunc dolor, aliquet vel rutrum in, molestie sit amet massa. Aliquam suscipit, justo a commodo condimentum, enim sapien fringilla ante, sed lobortis orci lectus in ante. Donec vel interdum est. Donec placerat cursus lacus, eu ultricies nisl tincidunt a. Fusce libero risus, sagittis eleifend iaculis aliquet, condimentum vitae diam. Suspendisse potenti. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin leo purus, sodales a venenatis luctus, faucibus ac enim. Sed id metus ac sem lobortis pretium. Mauris faucibus tempor scelerisque. Nunc vulputate interdum tortor, non tincidunt dui condimentum eget. Aenean in porttitor velit. Nam accumsan rhoncus risus id consectetur.
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus, felis interdum condimentum consectetur, nisl libero elementum eros, vehicula congue lacus eros non diam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus mauris lorem, lacinia id tempus non, imperdiet et leo. Cras sit amet erat sit amet lacus egestas placerat. Aenean ultricies ultrices mauris ac congue. In vel tortor vel velit tristique tempus ac id nisi. Proin quis lorem velit. Nunc dui dui, blandit a ullamcorper vitae, congue fringilla lectus. Aliquam ultricies malesuada feugiat. Vestibulum placerat turpis et eros lobortis vel semper sapien pulvinar.
Pellentesque rhoncus aliquet porta. Sed vel magna eu turpis pharetra consequat ut vitae lectus. In molestie sollicitudin mi sit amet convallis. Aliquam erat volutpat. Nullam feugiat placerat ipsum eget malesuada. Nulla facilisis nunc non dolor vehicula pretium. Sed dui magna, sodales id pharetra non, ullamcorper eu sapien. Mauris ac consectetur leo. Mauris consequat, lectus ut bibendum pulvinar, leo magna feugiat enim, eu commodo lacus sem vel ante. Sed tempus metus eget leo mollis vulputate. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
@@ -65,11 +70,12 @@
Nulla rhoncus elementum convallis. Mauris condimentum aliquet egestas. Ut iaculis nisi eget tellus accumsan venenatis. Maecenas imperdiet aliquam porta. Aenean ultrices dolor sed quam laoreet varius. Curabitur condimentum blandit erat, quis accumsan eros interdum vitae. Curabitur ligula arcu, sollicitudin vitae iaculis sed, blandit sit amet enim. Morbi ullamcorper, metus vel mollis tristique, arcu turpis malesuada nisi, at dignissim lorem odio a orci. Proin ultrices, ipsum ut vestibulum interdum, libero felis auctor mi, vitae convallis nisl justo ac tellus. Integer nec lacinia turpis. Etiam massa nisl, rhoncus quis rutrum in, pretium eu leo. Proin a velit ut nulla laoreet vestibulum. Curabitur eu elit vitae felis auctor tincidunt. Curabitur tincidunt, metus sed sollicitudin cursus, quam elit commodo erat, ut tempor erat sapien vitae velit. Morbi nec viverra erat.
Nullam scelerisque facilisis pretium. Vivamus lectus leo, commodo ac sagittis ac, dictum a mi. Donec quis massa ut libero malesuada commodo in et risus. Fusce nunc dolor, aliquet vel rutrum in, molestie sit amet massa. Aliquam suscipit, justo a commodo condimentum, enim sapien fringilla ante, sed lobortis orci lectus in ante. Donec vel interdum est. Donec placerat cursus lacus, eu ultricies nisl tincidunt a. Fusce libero risus, sagittis eleifend iaculis aliquet, condimentum vitae diam. Suspendisse potenti. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin leo purus, sodales a venenatis luctus, faucibus ac enim. Sed id metus ac sem lobortis pretium. Mauris faucibus tempor scelerisque. Nunc vulputate interdum tortor, non tincidunt dui condimentum eget. Aenean in porttitor velit. Nam accumsan rhoncus risus id consectetur.
+
$('.area').slimscroll({
- width: '200px'
+ width: '200px',
}).parent().css({
'float': 'left',
'margin-right': '30px'
@@ -83,7 +89,8 @@
$(function(){
$('.area').slimscroll({
- width: '200px'
+ width: '200px',
+ height: 'auto'
}).parent().css({
'float': 'left',
'margin-right': '30px'
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 0f07908..c8dc28e 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -144,7 +144,7 @@
}
// optionally set height to the parent's height
- o.height = (o.height == 'auto') ? me.parent().height() : o.height;
+ o.height = (options.height == 'auto') ? me.parent().height() : options.height;
// wrap content
var wrapper = $(divS)
From 7236f8f4d74d6a7529128d9248d5045207fcabba Mon Sep 17 00:00:00 2001
From: "@rochal"
Date: Fri, 27 Dec 2013 18:01:49 +1100
Subject: [PATCH 13/46] Revert #65 to fix scrolling on Firefox - #95.
---
jquery.slimscroll.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index c8dc28e..9ec8294 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -381,7 +381,6 @@
{
this.addEventListener('DOMMouseScroll', _onWheel, false );
this.addEventListener('mousewheel', _onWheel, false );
- this.addEventListener('MozMousePixelScroll', _onWheel, false );
}
else
{
From e9a38f401068dcbd472e2efafaf0e69558f97c94 Mon Sep 17 00:00:00 2001
From: "@rochal"
Date: Fri, 27 Dec 2013 18:03:13 +1100
Subject: [PATCH 14/46] Up the version number.
---
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 18 +++++++++---------
slimScroll.jquery.json | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 9ec8294..8f813ee 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.1
+ * Version: 1.3.2
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 3071977..40f9ce9 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,15 +2,15 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.1
+ * Version: 1.3.2
*
*/
-(function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d||
-window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),
-c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("").addClass(a.wrapperClass).css({position:"relative",
-overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var g=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
-"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
-b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
+(function(f){jQuery.fn.extend({slimScroll:function(g){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function u(d){if(r){d=d||
+window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,g){k=!1;var e=d,h=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),h),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+
+a.railClass);w();if(f.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==g.height?b.parent().height():g.height;n=f("").addClass(a.wrapperClass).css({position:"relative",
+overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
+"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
+b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
\ No newline at end of file
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
index 1559a47..9fd201b 100644
--- a/slimScroll.jquery.json
+++ b/slimScroll.jquery.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.1",
+ "version" : "1.3.2",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
From be134d2e7c5be367d9750b3a903b1937a412c260 Mon Sep 17 00:00:00 2001
From: Joshua Balloch
Date: Thu, 23 Jan 2014 11:52:59 +0800
Subject: [PATCH 15/46] dynamically assign isOverPanel to reduce mistaken
mousewheel captures
---
jquery.slimscroll.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 8f813ee..a957f1b 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -93,6 +93,11 @@
// used in event handlers and for better minification
var me = $(this);
+ // create a simple function to check if panel is being hovered over.
+ isOverPanel = function () {
+ return me.is(":hover");
+ }
+
// ensure we are not binding it again
if (me.parent().hasClass(o.wrapperClass))
{
@@ -249,11 +254,9 @@
// show on parent mouseover
me.hover(function(){
- isOverPanel = true;
showBar();
hideBar();
}, function(){
- isOverPanel = false;
hideBar();
});
@@ -307,7 +310,7 @@
function _onWheel(e)
{
// use mouse wheel only when mouse is over
- if (!isOverPanel) { return; }
+ if (!isOverPanel()) { return; }
var e = e || window.event;
@@ -440,7 +443,7 @@
if (!o.alwaysVisible)
{
queueHide = setTimeout(function(){
- if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
+ if (!(o.disableFadeOut && isOverPanel()) && !isOverBar && !isDragg)
{
bar.fadeOut('slow');
rail.fadeOut('slow');
From 00a2dd7885ed2e3c897cc1662927babb62ab8864 Mon Sep 17 00:00:00 2001
From: Tony Wang
Date: Sun, 4 May 2014 12:21:33 +0800
Subject: [PATCH 16/46] Create bower.json
Make it to be friendly to bower
---
bower.json | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 bower.json
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..9787b57
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,30 @@
+{
+ "name" : "slimScroll",
+ "version" : "1.3.2",
+ "title" : "jQuery slimScroll scrollbar",
+ "description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
+ "keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
+ "demo" : "http://rocha.la/jQuery-slimScroll/",
+ "homepage" : "http://rocha.la/jQuery-slimScroll/",
+ "download" : "http://rocha.la/jQuery-slimScroll/",
+
+ "author" : {
+ "name" : "Piotr Rochala",
+ "url" : "http://rocha.la/"
+ },
+
+ "dependencies" : {
+ "jquery" : ">= 1.7"
+ },
+
+ "licenses" : [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/mit-license.php"
+ },
+ {
+ "type": "GPL",
+ "url": "http://www.opensource.org/licenses/gpl-license.php"
+ }
+ ]
+}
From 053e421191a786c515c8dd6dc7b9692e2efeee03 Mon Sep 17 00:00:00 2001
From: Tony Wang
Date: Tue, 24 Jun 2014 09:53:08 +0800
Subject: [PATCH 17/46] Update bower.json
add main attribute to the bower.json
---
bower.json | 2 ++
1 file changed, 2 insertions(+)
diff --git a/bower.json b/bower.json
index 9787b57..52e0c8a 100644
--- a/bower.json
+++ b/bower.json
@@ -7,6 +7,8 @@
"demo" : "http://rocha.la/jQuery-slimScroll/",
"homepage" : "http://rocha.la/jQuery-slimScroll/",
"download" : "http://rocha.la/jQuery-slimScroll/",
+
+ "main": "./jquery.slimscroll.min.js",
"author" : {
"name" : "Piotr Rochala",
From 9bb3a79a963854960a971d605a41f25169aa5b07 Mon Sep 17 00:00:00 2001
From: Louy Alakkad
Date: Mon, 30 Jun 2014 16:55:15 +0300
Subject: [PATCH 18/46] Calling "destroy" shouldn't create an instance
Fixes #87
---
jquery.slimscroll.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 8f813ee..a4d195c 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -142,6 +142,13 @@
return;
}
+ else if ($.isPlainObject(options))
+ {
+ if ('destroy' in options)
+ {
+ return;
+ }
+ }
// optionally set height to the parent's height
o.height = (options.height == 'auto') ? me.parent().height() : options.height;
From d41d7b764bcdd6aa2ff1676dd5c91a869ec6974d Mon Sep 17 00:00:00 2001
From: Keith Daulton
Date: Fri, 11 Jul 2014 10:59:02 -0400
Subject: [PATCH 19/46] Use IIFE param for jQuery reference
This is important if you assigned jQuery.noConflict() to variable and only want to reference that.
---
jquery.slimscroll.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 8f813ee..82ff1f2 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -7,7 +7,7 @@
*/
(function($) {
- jQuery.fn.extend({
+ $.fn.extend({
slimScroll: function(options) {
var defaults = {
@@ -456,8 +456,8 @@
}
});
- jQuery.fn.extend({
- slimscroll: jQuery.fn.slimScroll
+ $.fn.extend({
+ slimscroll: $.fn.slimScroll
});
})(jQuery);
From be03c37746fa0aea68cfec148fefa1c878d8386e Mon Sep 17 00:00:00 2001
From: Keith Daulton
Date: Fri, 11 Jul 2014 11:02:23 -0400
Subject: [PATCH 20/46] Use IIFE param for jQuery reference
Updated compressed version
---
jquery.slimscroll.min.js | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 40f9ce9..c60cdbc 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -5,12 +5,4 @@
* Version: 1.3.2
*
*/
-(function(f){jQuery.fn.extend({slimScroll:function(g){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function u(d){if(r){d=d||
-window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,g){k=!1;var e=d,h=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),h),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+
-a.railClass);w();if(f.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==g.height?b.parent().height():g.height;n=f("").addClass(a.wrapperClass).css({position:"relative",
-overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
-"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
-b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
-(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
\ No newline at end of file
+function(a){a.fn.extend({slimScroll:function(b){var c={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},d=a.extend(c,b);return this.each(function(){function w(b){if(c){var b=b||window.event,e=0;b.wheelDelta&&(e=-b.wheelDelta/120),b.detail&&(e=b.detail/3);var f=b.target||b.srcTarget||b.srcElement;a(f).closest("."+d.wrapperClass).is(o.parent())&&x(e,!0),b.preventDefault&&!n&&b.preventDefault(),n||(b.returnValue=!1)}}function x(a,b,c){n=!1;var e=a,f=o.outerHeight()-u.outerHeight();if(b&&(e=parseInt(u.css("top"))+a*parseInt(d.wheelStep)/100*u.outerHeight(),e=Math.min(Math.max(e,0),f),e=a>0?Math.ceil(e):Math.floor(e),u.css({top:e+"px"})),j=parseInt(u.css("top"))/(o.outerHeight()-u.outerHeight()),e=j*(o[0].scrollHeight-o.outerHeight()),c){e=a;var g=e/o[0].scrollHeight*o.outerHeight();g=Math.min(Math.max(g,0),f),u.css({top:g+"px"})}o.scrollTop(e),o.trigger("slimscrolling",~~e),A(),B()}function y(){window.addEventListener?(this.addEventListener("DOMMouseScroll",w,!1),this.addEventListener("mousewheel",w,!1)):document.attachEvent("onmousewheel",w)}function z(){i=Math.max(o.outerHeight()/o[0].scrollHeight*o.outerHeight(),m),u.css({height:i+"px"});var a=i==o.outerHeight()?"none":"block";u.css({display:a})}function A(){if(z(),clearTimeout(g),j==~~j){if(n=d.allowPageScroll,k!=j){var a=0==~~j?"top":"bottom";o.trigger("slimscroll",a)}}else n=!1;return k=j,i>=o.outerHeight()?(n=!0,void 0):(u.stop(!0,!0).fadeIn("fast"),d.railVisible&&s.stop(!0,!0).fadeIn("fast"),void 0)}function B(){d.alwaysVisible||(g=setTimeout(function(){d.disableFadeOut&&c||e||f||(u.fadeOut("slow"),s.fadeOut("slow"))},1e3))}var c,e,f,g,h,i,j,k,l="",m=30,n=!1,o=a(this);if(o.parent().hasClass(d.wrapperClass)){var p=o.scrollTop();if(u=o.parent().find("."+d.barClass),s=o.parent().find("."+d.railClass),z(),a.isPlainObject(b)){if("height"in b&&"auto"==b.height){o.parent().css("height","auto"),o.css("height","auto");var q=o.parent().parent().height();o.parent().css("height",q),o.css("height",q)}if("scrollTo"in b)p=parseInt(d.scrollTo);else if("scrollBy"in b)p+=parseInt(d.scrollBy);else if("destroy"in b)return u.remove(),s.remove(),o.unwrap(),void 0;x(p,!1,!0)}}else{d.height="auto"==b.height?o.parent().height():b.height;var r=a(l).addClass(d.wrapperClass).css({position:"relative",overflow:"hidden",width:d.width,height:d.height});o.css({overflow:"hidden",width:d.width,height:d.height});var s=a(l).addClass(d.railClass).css({width:d.size,height:"100%",position:"absolute",top:0,display:d.alwaysVisible&&d.railVisible?"block":"none","border-radius":d.railBorderRadius,background:d.railColor,opacity:d.railOpacity,zIndex:90}),u=a(l).addClass(d.barClass).css({background:d.color,width:d.size,position:"absolute",top:0,opacity:d.opacity,display:d.alwaysVisible?"block":"none","border-radius":d.borderRadius,BorderRadius:d.borderRadius,MozBorderRadius:d.borderRadius,WebkitBorderRadius:d.borderRadius,zIndex:99}),v="right"==d.position?{right:d.distance}:{left:d.distance};s.css(v),u.css(v),o.wrap(r),o.parent().append(u),o.parent().append(s),d.railDraggable&&u.bind("mousedown",function(b){var c=a(document);return f=!0,t=parseFloat(u.css("top")),pageY=b.pageY,c.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY,u.css("top",currTop),x(0,u.position().top,!1)}),c.bind("mouseup.slimscroll",function(){f=!1,B(),c.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(a){return a.stopPropagation(),a.preventDefault(),!1}),s.hover(function(){A()},function(){B()}),u.hover(function(){e=!0},function(){e=!1}),o.hover(function(){c=!0,A(),B()},function(){c=!1,B()}),o.bind("touchstart",function(a){a.originalEvent.touches.length&&(h=a.originalEvent.touches[0].pageY)}),o.bind("touchmove",function(a){if(n||a.originalEvent.preventDefault(),a.originalEvent.touches.length){var b=(h-a.originalEvent.touches[0].pageY)/d.touchScrollStep;x(b,!0),h=a.originalEvent.touches[0].pageY}}),z(),"bottom"===d.start?(u.css({top:o.outerHeight()-u.outerHeight()}),x(0,!0)):"top"!==d.start&&(x(a(d.start).position().top,null,!0),d.alwaysVisible||u.hide()),y()}}),this}}),a.fn.extend({slimscroll:a.fn.slimScroll})}(jQuery);
From f82fa180b0e3c5fd4ec05a038a541cfcf0d465b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexis=20S=C3=A1nchez?=
Date: Thu, 31 Jul 2014 08:51:56 -0430
Subject: [PATCH 21/46] a minor fix
---
examples/style.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/style.css b/examples/style.css
index f12104a..b676c81 100644
--- a/examples/style.css
+++ b/examples/style.css
@@ -6,7 +6,7 @@ pre.prettyprint { padding:15px; border:1px solid #eee; border-radius:5px; backgr
.examples { border-radius:20px; background:#fff; padding:15px;
margin:0 150px 0 0; border-collapse: collapse; border:1px solid #000; }
.slimScrollDiv { border:1px solid #eee; }
-#nav { position:fixed; top:0 left:0; background:#fff; padding:15px; border-radius:20px; width:200px; }
+#nav { position:fixed; top:0; left:0; background:#fff; padding:15px; border-radius:20px; width:200px; }
#nav ul { list-style-type:square; list-style-position:inside; margin:20px 0 0 0; padding:0; }
#nav a { text-decoration:none; color:#000; }
#nav a:hover { text-decoration: underline }
From dd253675ee1de2646101ce14788d50c4510b580a Mon Sep 17 00:00:00 2001
From: piotrr
Date: Mon, 1 Sep 2014 10:03:58 +1000
Subject: [PATCH 22/46] Fix issue with passing auto height option
---
jquery.slimscroll.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 169c2b6..4d759ad 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -151,7 +151,7 @@
}
// optionally set height to the parent's height
- o.height = (options.height == 'auto') ? me.parent().height() : options.height;
+ o.height = (o.height == 'auto') ? me.parent().height() : o.height;
// wrap content
var wrapper = $(divS)
From 4192bd561bb9bf65e32bb0fea95047e78166abb6 Mon Sep 17 00:00:00 2001
From: Piotr Rochala
Date: Mon, 1 Sep 2014 10:14:10 +1000
Subject: [PATCH 23/46] Revert "[Critical Bug] dynamically assign isOverPanel
to reduce mistaken mousewheel captures"
---
jquery.slimscroll.js | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index d219493..4d759ad 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -93,11 +93,6 @@
// used in event handlers and for better minification
var me = $(this);
- // create a simple function to check if panel is being hovered over.
- isOverPanel = function () {
- return me.is(":hover");
- }
-
// ensure we are not binding it again
if (me.parent().hasClass(o.wrapperClass))
{
@@ -261,9 +256,11 @@
// show on parent mouseover
me.hover(function(){
+ isOverPanel = true;
showBar();
hideBar();
}, function(){
+ isOverPanel = false;
hideBar();
});
@@ -317,7 +314,7 @@
function _onWheel(e)
{
// use mouse wheel only when mouse is over
- if (!isOverPanel()) { return; }
+ if (!isOverPanel) { return; }
var e = e || window.event;
@@ -450,7 +447,7 @@
if (!o.alwaysVisible)
{
queueHide = setTimeout(function(){
- if (!(o.disableFadeOut && isOverPanel()) && !isOverBar && !isDragg)
+ if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
{
bar.fadeOut('slow');
rail.fadeOut('slow');
From c1d1c794f8364d751b188c8b21859501c7991249 Mon Sep 17 00:00:00 2001
From: piotrr
Date: Mon, 1 Sep 2014 10:17:54 +1000
Subject: [PATCH 24/46] Update version, recompile minified code
---
bower.json | 4 ++--
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 12 ++++++++++--
slimScroll.jquery.json | 2 +-
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/bower.json b/bower.json
index 52e0c8a..1f5f71f 100644
--- a/bower.json
+++ b/bower.json
@@ -1,13 +1,13 @@
{
"name" : "slimScroll",
- "version" : "1.3.2",
+ "version" : "1.3.3",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
"demo" : "http://rocha.la/jQuery-slimScroll/",
"homepage" : "http://rocha.la/jQuery-slimScroll/",
"download" : "http://rocha.la/jQuery-slimScroll/",
-
+
"main": "./jquery.slimscroll.min.js",
"author" : {
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 4d759ad..190368e 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.2
+ * Version: 1.3.3
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index c60cdbc..f25b5cc 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,7 +2,15 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.2
+ * Version: 1.3.3
*
*/
-function(a){a.fn.extend({slimScroll:function(b){var c={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},d=a.extend(c,b);return this.each(function(){function w(b){if(c){var b=b||window.event,e=0;b.wheelDelta&&(e=-b.wheelDelta/120),b.detail&&(e=b.detail/3);var f=b.target||b.srcTarget||b.srcElement;a(f).closest("."+d.wrapperClass).is(o.parent())&&x(e,!0),b.preventDefault&&!n&&b.preventDefault(),n||(b.returnValue=!1)}}function x(a,b,c){n=!1;var e=a,f=o.outerHeight()-u.outerHeight();if(b&&(e=parseInt(u.css("top"))+a*parseInt(d.wheelStep)/100*u.outerHeight(),e=Math.min(Math.max(e,0),f),e=a>0?Math.ceil(e):Math.floor(e),u.css({top:e+"px"})),j=parseInt(u.css("top"))/(o.outerHeight()-u.outerHeight()),e=j*(o[0].scrollHeight-o.outerHeight()),c){e=a;var g=e/o[0].scrollHeight*o.outerHeight();g=Math.min(Math.max(g,0),f),u.css({top:g+"px"})}o.scrollTop(e),o.trigger("slimscrolling",~~e),A(),B()}function y(){window.addEventListener?(this.addEventListener("DOMMouseScroll",w,!1),this.addEventListener("mousewheel",w,!1)):document.attachEvent("onmousewheel",w)}function z(){i=Math.max(o.outerHeight()/o[0].scrollHeight*o.outerHeight(),m),u.css({height:i+"px"});var a=i==o.outerHeight()?"none":"block";u.css({display:a})}function A(){if(z(),clearTimeout(g),j==~~j){if(n=d.allowPageScroll,k!=j){var a=0==~~j?"top":"bottom";o.trigger("slimscroll",a)}}else n=!1;return k=j,i>=o.outerHeight()?(n=!0,void 0):(u.stop(!0,!0).fadeIn("fast"),d.railVisible&&s.stop(!0,!0).fadeIn("fast"),void 0)}function B(){d.alwaysVisible||(g=setTimeout(function(){d.disableFadeOut&&c||e||f||(u.fadeOut("slow"),s.fadeOut("slow"))},1e3))}var c,e,f,g,h,i,j,k,l="",m=30,n=!1,o=a(this);if(o.parent().hasClass(d.wrapperClass)){var p=o.scrollTop();if(u=o.parent().find("."+d.barClass),s=o.parent().find("."+d.railClass),z(),a.isPlainObject(b)){if("height"in b&&"auto"==b.height){o.parent().css("height","auto"),o.css("height","auto");var q=o.parent().parent().height();o.parent().css("height",q),o.css("height",q)}if("scrollTo"in b)p=parseInt(d.scrollTo);else if("scrollBy"in b)p+=parseInt(d.scrollBy);else if("destroy"in b)return u.remove(),s.remove(),o.unwrap(),void 0;x(p,!1,!0)}}else{d.height="auto"==b.height?o.parent().height():b.height;var r=a(l).addClass(d.wrapperClass).css({position:"relative",overflow:"hidden",width:d.width,height:d.height});o.css({overflow:"hidden",width:d.width,height:d.height});var s=a(l).addClass(d.railClass).css({width:d.size,height:"100%",position:"absolute",top:0,display:d.alwaysVisible&&d.railVisible?"block":"none","border-radius":d.railBorderRadius,background:d.railColor,opacity:d.railOpacity,zIndex:90}),u=a(l).addClass(d.barClass).css({background:d.color,width:d.size,position:"absolute",top:0,opacity:d.opacity,display:d.alwaysVisible?"block":"none","border-radius":d.borderRadius,BorderRadius:d.borderRadius,MozBorderRadius:d.borderRadius,WebkitBorderRadius:d.borderRadius,zIndex:99}),v="right"==d.position?{right:d.distance}:{left:d.distance};s.css(v),u.css(v),o.wrap(r),o.parent().append(u),o.parent().append(s),d.railDraggable&&u.bind("mousedown",function(b){var c=a(document);return f=!0,t=parseFloat(u.css("top")),pageY=b.pageY,c.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY,u.css("top",currTop),x(0,u.position().top,!1)}),c.bind("mouseup.slimscroll",function(){f=!1,B(),c.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(a){return a.stopPropagation(),a.preventDefault(),!1}),s.hover(function(){A()},function(){B()}),u.hover(function(){e=!0},function(){e=!1}),o.hover(function(){c=!0,A(),B()},function(){c=!1,B()}),o.bind("touchstart",function(a){a.originalEvent.touches.length&&(h=a.originalEvent.touches[0].pageY)}),o.bind("touchmove",function(a){if(n||a.originalEvent.preventDefault(),a.originalEvent.touches.length){var b=(h-a.originalEvent.touches[0].pageY)/d.touchScrollStep;x(b,!0),h=a.originalEvent.touches[0].pageY}}),z(),"bottom"===d.start?(u.css({top:o.outerHeight()-u.outerHeight()}),x(0,!0)):"top"!==d.start&&(x(a(d.start).position().top,null,!0),d.alwaysVisible||u.hide()),y()}}),this}}),a.fn.extend({slimscroll:a.fn.slimScroll})}(jQuery);
+(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function u(d){if(r){d=d||window.event;
+var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+a.railClass);
+w();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("").addClass(a.wrapperClass).css({position:"relative",
+overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
+"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
+b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
+(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
\ No newline at end of file
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
index 9fd201b..a6bcd84 100644
--- a/slimScroll.jquery.json
+++ b/slimScroll.jquery.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.2",
+ "version" : "1.3.3",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
From 2ffd91c78da6a82942a024c6e8727a80bded156c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marin=20B=C3=AEnzari?=
Date: Sun, 15 Mar 2015 17:33:28 +0200
Subject: [PATCH 25/46] Allow multilevel slimscrolls
Fixes issue #182: multilevel slimscrolls.
Changed the selector to select the right `bar` and `rail` element to remove from DOM.
In the issue https://github.com/rochal/jQuery-slimScroll/issues/182 is described that multilevel slimscrolls aren't allowed. On destroy of the parent slimscroll, the `bar`s and `rail`s DOM elements for the children scroll are removed.
---
jquery.slimscroll.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 190368e..e3ac6e6 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -100,8 +100,8 @@
var offset = me.scrollTop();
// find bar and rail
- bar = me.parent().find('.' + o.barClass);
- rail = me.parent().find('.' + o.railClass);
+ bar = me.closest('.' + o.barClass);
+ rail = me.closest('.' + o.railClass);
getBarHeight();
From 00c77d0543002089166cb4b800ecb99455c4e40a Mon Sep 17 00:00:00 2001
From: Tony Wang
Date: Sat, 4 Apr 2015 11:06:56 +0800
Subject: [PATCH 26/46] Update jquery.slimscroll.js
Inside the attach, this is the Window object, not the DOM container, this could cause the page scroll blocked, because the _onWheel still being used to process the page scroll event while the slimscroll container has been destroyed.
---
jquery.slimscroll.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 190368e..a42947d 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -309,7 +309,7 @@
}
// attach scroll events
- attachWheel();
+ attachWheel(this);
function _onWheel(e)
{
@@ -382,12 +382,12 @@
hideBar();
}
- function attachWheel()
+ function attachWheel(target)
{
if (window.addEventListener)
{
- this.addEventListener('DOMMouseScroll', _onWheel, false );
- this.addEventListener('mousewheel', _onWheel, false );
+ target.addEventListener('DOMMouseScroll', _onWheel, false );
+ target.addEventListener('mousewheel', _onWheel, false );
}
else
{
From cc3014ba4f7a32a646c145b5b5e2634bafa712ab Mon Sep 17 00:00:00 2001
From: nirmal bhagwani
Date: Thu, 16 Apr 2015 14:57:52 +0530
Subject: [PATCH 27/46] adding option if element is already hovered
if element is already hovered like if you have applied slimscroll to whole body it will not fire scroll
---
jquery.slimscroll.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 190368e..aacc9e2 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -48,6 +48,9 @@
// sets rail color
railColor : '#333',
+ //if already mouse is there
+ mouseOver:false,
+
// sets rail opacity
railOpacity : .2,
@@ -333,6 +336,13 @@
if (!releaseScroll) { e.returnValue = false; }
}
+ //if element is allready hovered
+ if(o.mouseOver){
+ isOverPanel = true;
+ showBar();
+ hideBar();
+ }
+
function scrollContent(y, isWheel, isJump)
{
releaseScroll = false;
From 15fe8209993c4610ef433997cc5b1928bf2ddc28 Mon Sep 17 00:00:00 2001
From: nirmal bhagwani
Date: Thu, 16 Apr 2015 15:03:12 +0530
Subject: [PATCH 28/46] showing option of mouseover true demo
---
README.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/README.md b/README.md
index 44d1b8f..7c86284 100644
--- a/README.md
+++ b/README.md
@@ -7,3 +7,8 @@ Demo and more: http://rocha.la/jQuery-slimScroll
Copyright (c) 2011 Piotr Rochala (http://rocha.la)
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+added option over librarry of rochal
+jQuery('#scroll').slimScroll({
+ height: jQuery(window).height()+'px', //if you want whole page containing div to get scroll it's a trick only
+ mouseOver:true // if element you want to scroll will already hovered then make it true else no need to mention it.
+ });
From 1b0a211f0e2dd518a8bed5172f283c87da52c46f Mon Sep 17 00:00:00 2001
From: nirmal bhagwani
Date: Sat, 18 Apr 2015 20:22:39 +0530
Subject: [PATCH 29/46] make it robust with animation and mouse pre over
---
jquery.slimscroll.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index aacc9e2..381a4e8 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -50,6 +50,9 @@
//if already mouse is there
mouseOver:false,
+
+ // sets animation status on a given scroll
+ animate: false,
// sets rail opacity
railOpacity : .2,
@@ -338,11 +341,16 @@
//if element is allready hovered
if(o.mouseOver){
- isOverPanel = true;
- showBar();
- hideBar();
+ rail.trigger('hover')
}
+ // scroll content
+ if (o.animate){
+ me.animate({ scrollTop: delta });
+ }else{
+ me.scrollTop(delta);
+ }
+
function scrollContent(y, isWheel, isJump)
{
releaseScroll = false;
From 75763c05e5c26a4bf3db5fc351e26045e897e34a Mon Sep 17 00:00:00 2001
From: nirmal bhagwani
Date: Sat, 18 Apr 2015 20:23:39 +0530
Subject: [PATCH 30/46] update it with robust pre hover and adding animation
option
---
jquery.slimscroll.min.js | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index f25b5cc..72d364f 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -1,16 +1 @@
-/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * Version: 1.3.3
- *
- */
-(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function u(d){if(r){d=d||window.event;
-var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+a.railClass);
-w();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("").addClass(a.wrapperClass).css({position:"relative",
-overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
-"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
-b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
-(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
\ No newline at end of file
+!function(e){e.fn.extend({slimScroll:function(i){var o={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",mouseOver:!1,animate:!1,railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},r=e.extend(o,i);return this.each(function(){function o(t){if(h){var t=t||window.event,i=0;t.wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var o=t.target||t.srcTarget||t.srcElement;e(o).closest("."+r.wrapperClass).is(x.parent())&&a(i,!0),t.preventDefault&&!y&&t.preventDefault(),y||(t.returnValue=!1)}}function a(e,t,i){y=!1;var o=e,a=x.outerHeight()-O.outerHeight();if(t&&(o=parseInt(O.css("top"))+e*parseInt(r.wheelStep)/100*O.outerHeight(),o=Math.min(Math.max(o,0),a),o=e>0?Math.ceil(o):Math.floor(o),O.css({top:o+"px"})),v=parseInt(O.css("top"))/(x.outerHeight()-O.outerHeight()),o=v*(x[0].scrollHeight-x.outerHeight()),i){o=e;var s=o/x[0].scrollHeight*x.outerHeight();s=Math.min(Math.max(s,0),a),O.css({top:s+"px"})}x.scrollTop(o),x.trigger("slimscrolling",~~o),n(),c()}function s(){window.addEventListener?(this.addEventListener("DOMMouseScroll",o,!1),this.addEventListener("mousewheel",o,!1)):document.attachEvent("onmousewheel",o)}function l(){f=Math.max(x.outerHeight()/x[0].scrollHeight*x.outerHeight(),w),O.css({height:f+"px"});var e=f==x.outerHeight()?"none":"block";O.css({display:e})}function n(){if(l(),clearTimeout(p),v==~~v){if(y=r.allowPageScroll,b!=v){var e=0==~~v?"top":"bottom";x.trigger("slimscroll",e)}}else y=!1;return b=v,f>=x.outerHeight()?void(y=!0):(O.stop(!0,!0).fadeIn("fast"),void(r.railVisible&&E.stop(!0,!0).fadeIn("fast")))}function c(){r.alwaysVisible||(p=setTimeout(function(){r.disableFadeOut&&h||u||d||(O.fadeOut("slow"),E.fadeOut("slow"))},1e3))}var h,u,d,p,g,f,v,b,m="",w=30,y=!1,x=e(this);if(x.parent().hasClass(r.wrapperClass)){var C=x.scrollTop();if(O=x.parent().find("."+r.barClass),E=x.parent().find("."+r.railClass),l(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){x.parent().css("height","auto"),x.css("height","auto");var H=x.parent().parent().height();x.parent().css("height",H),x.css("height",H)}if("scrollTo"in i)C=parseInt(r.scrollTo);else if("scrollBy"in i)C+=parseInt(r.scrollBy);else if("destroy"in i)return O.remove(),E.remove(),void x.unwrap();a(C,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){r.height="auto"==r.height?x.parent().height():r.height;var S=e(m).addClass(r.wrapperClass).css({position:"relative",overflow:"hidden",width:r.width,height:r.height});x.css({overflow:"hidden",width:r.width,height:r.height});var E=e(m).addClass(r.railClass).css({width:r.size,height:"100%",position:"absolute",top:0,display:r.alwaysVisible&&r.railVisible?"block":"none","border-radius":r.railBorderRadius,background:r.railColor,opacity:r.railOpacity,zIndex:90}),O=e(m).addClass(r.barClass).css({background:r.color,width:r.size,position:"absolute",top:0,opacity:r.opacity,display:r.alwaysVisible?"block":"none","border-radius":r.borderRadius,BorderRadius:r.borderRadius,MozBorderRadius:r.borderRadius,WebkitBorderRadius:r.borderRadius,zIndex:99}),R="right"==r.position?{right:r.distance}:{left:r.distance};E.css(R),O.css(R),x.wrap(S),x.parent().append(O),x.parent().append(E),r.railDraggable&&O.bind("mousedown",function(i){var o=e(document);return d=!0,t=parseFloat(O.css("top")),pageY=i.pageY,o.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,O.css("top",currTop),a(0,O.position().top,!1)}),o.bind("mouseup.slimscroll",function(){d=!1,c(),o.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(e){return e.stopPropagation(),e.preventDefault(),!1}),E.hover(function(){n()},function(){c()}),O.hover(function(){u=!0},function(){u=!1}),x.hover(function(){h=!0,n(),c()},function(){h=!1,c()}),x.bind("touchstart",function(e){e.originalEvent.touches.length&&(g=e.originalEvent.touches[0].pageY)}),x.bind("touchmove",function(e){if(y||e.originalEvent.preventDefault(),e.originalEvent.touches.length){var t=(g-e.originalEvent.touches[0].pageY)/r.touchScrollStep;a(t,!0),g=e.originalEvent.touches[0].pageY}}),l(),"bottom"===r.start?(O.css({top:x.outerHeight()-O.outerHeight()}),a(0,!0)):"top"!==r.start&&(a(e(r.start).position().top,null,!0),r.alwaysVisible||O.hide()),s(),r.mouseOver&&E.trigger("hover"),r.animate?x.animate({scrollTop:delta}):x.scrollTop(delta)}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery);
From 0364ad5467d556eff72a88c0d3908c13e1bf27cb Mon Sep 17 00:00:00 2001
From: Dotan Simha
Date: Thu, 23 Apr 2015 18:20:21 +0300
Subject: [PATCH 31/46] Added support for Meteor.js packaging
---
package.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 package.js
diff --git a/package.js b/package.js
new file mode 100644
index 0000000..b855202
--- /dev/null
+++ b/package.js
@@ -0,0 +1,13 @@
+Package.describe({
+ name: 'rochal:slimscroll',
+ version: '1.3.3',
+ summary: 'jQuery SlimScroll package for meteor.',
+ git: 'https://github.com/rochal/jQuery-slimScroll',
+ documentation: 'README.md'
+});
+
+Package.onUse(function (api) {
+ api.versionsFrom('METEOR@0.9.0.1');
+ api.use('jquery', 'client');
+ api.addFiles('jquery.slimscroll.js', 'client');
+});
From 3956b86403d52824ce3bfd458f7589c6e1d720ff Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 13:08:30 +1000
Subject: [PATCH 32/46] Fixup readme
---
README.md | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 7c86284..8042660 100644
--- a/README.md
+++ b/README.md
@@ -5,10 +5,4 @@ slimScroll is a small jQuery plugin that transforms any div into a scrollable ar
Demo and more: http://rocha.la/jQuery-slimScroll
Copyright (c) 2011 Piotr Rochala (http://rocha.la)
-Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
-
-added option over librarry of rochal
-jQuery('#scroll').slimScroll({
- height: jQuery(window).height()+'px', //if you want whole page containing div to get scroll it's a trick only
- mouseOver:true // if element you want to scroll will already hovered then make it true else no need to mention it.
- });
+Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
\ No newline at end of file
From 3a3a51c42d2abb605b846e08813a8fce3470f470 Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 13:13:25 +1000
Subject: [PATCH 33/46] Revert #199
---
jquery.slimscroll.js | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 381a4e8..190368e 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -48,12 +48,6 @@
// sets rail color
railColor : '#333',
- //if already mouse is there
- mouseOver:false,
-
- // sets animation status on a given scroll
- animate: false,
-
// sets rail opacity
railOpacity : .2,
@@ -339,18 +333,6 @@
if (!releaseScroll) { e.returnValue = false; }
}
- //if element is allready hovered
- if(o.mouseOver){
- rail.trigger('hover')
- }
-
- // scroll content
- if (o.animate){
- me.animate({ scrollTop: delta });
- }else{
- me.scrollTop(delta);
- }
-
function scrollContent(y, isWheel, isJump)
{
releaseScroll = false;
From 43cb2d6c34cfdd0bf5735b385c077b585070bc7e Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 14:04:32 +1000
Subject: [PATCH 34/46] Release 1.3.4
---
bower.json | 2 +-
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 17 ++++++++++++++++-
package.js | 2 +-
slimScroll.jquery.json | 2 +-
5 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/bower.json b/bower.json
index 1f5f71f..06075f6 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.3",
+ "version" : "1.3.4",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 3eeedb7..fad01f0 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.3
+ * Version: 1.3.4
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 72d364f..113c621 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -1 +1,16 @@
-!function(e){e.fn.extend({slimScroll:function(i){var o={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",mouseOver:!1,animate:!1,railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},r=e.extend(o,i);return this.each(function(){function o(t){if(h){var t=t||window.event,i=0;t.wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var o=t.target||t.srcTarget||t.srcElement;e(o).closest("."+r.wrapperClass).is(x.parent())&&a(i,!0),t.preventDefault&&!y&&t.preventDefault(),y||(t.returnValue=!1)}}function a(e,t,i){y=!1;var o=e,a=x.outerHeight()-O.outerHeight();if(t&&(o=parseInt(O.css("top"))+e*parseInt(r.wheelStep)/100*O.outerHeight(),o=Math.min(Math.max(o,0),a),o=e>0?Math.ceil(o):Math.floor(o),O.css({top:o+"px"})),v=parseInt(O.css("top"))/(x.outerHeight()-O.outerHeight()),o=v*(x[0].scrollHeight-x.outerHeight()),i){o=e;var s=o/x[0].scrollHeight*x.outerHeight();s=Math.min(Math.max(s,0),a),O.css({top:s+"px"})}x.scrollTop(o),x.trigger("slimscrolling",~~o),n(),c()}function s(){window.addEventListener?(this.addEventListener("DOMMouseScroll",o,!1),this.addEventListener("mousewheel",o,!1)):document.attachEvent("onmousewheel",o)}function l(){f=Math.max(x.outerHeight()/x[0].scrollHeight*x.outerHeight(),w),O.css({height:f+"px"});var e=f==x.outerHeight()?"none":"block";O.css({display:e})}function n(){if(l(),clearTimeout(p),v==~~v){if(y=r.allowPageScroll,b!=v){var e=0==~~v?"top":"bottom";x.trigger("slimscroll",e)}}else y=!1;return b=v,f>=x.outerHeight()?void(y=!0):(O.stop(!0,!0).fadeIn("fast"),void(r.railVisible&&E.stop(!0,!0).fadeIn("fast")))}function c(){r.alwaysVisible||(p=setTimeout(function(){r.disableFadeOut&&h||u||d||(O.fadeOut("slow"),E.fadeOut("slow"))},1e3))}var h,u,d,p,g,f,v,b,m="",w=30,y=!1,x=e(this);if(x.parent().hasClass(r.wrapperClass)){var C=x.scrollTop();if(O=x.parent().find("."+r.barClass),E=x.parent().find("."+r.railClass),l(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){x.parent().css("height","auto"),x.css("height","auto");var H=x.parent().parent().height();x.parent().css("height",H),x.css("height",H)}if("scrollTo"in i)C=parseInt(r.scrollTo);else if("scrollBy"in i)C+=parseInt(r.scrollBy);else if("destroy"in i)return O.remove(),E.remove(),void x.unwrap();a(C,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){r.height="auto"==r.height?x.parent().height():r.height;var S=e(m).addClass(r.wrapperClass).css({position:"relative",overflow:"hidden",width:r.width,height:r.height});x.css({overflow:"hidden",width:r.width,height:r.height});var E=e(m).addClass(r.railClass).css({width:r.size,height:"100%",position:"absolute",top:0,display:r.alwaysVisible&&r.railVisible?"block":"none","border-radius":r.railBorderRadius,background:r.railColor,opacity:r.railOpacity,zIndex:90}),O=e(m).addClass(r.barClass).css({background:r.color,width:r.size,position:"absolute",top:0,opacity:r.opacity,display:r.alwaysVisible?"block":"none","border-radius":r.borderRadius,BorderRadius:r.borderRadius,MozBorderRadius:r.borderRadius,WebkitBorderRadius:r.borderRadius,zIndex:99}),R="right"==r.position?{right:r.distance}:{left:r.distance};E.css(R),O.css(R),x.wrap(S),x.parent().append(O),x.parent().append(E),r.railDraggable&&O.bind("mousedown",function(i){var o=e(document);return d=!0,t=parseFloat(O.css("top")),pageY=i.pageY,o.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,O.css("top",currTop),a(0,O.position().top,!1)}),o.bind("mouseup.slimscroll",function(){d=!1,c(),o.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(e){return e.stopPropagation(),e.preventDefault(),!1}),E.hover(function(){n()},function(){c()}),O.hover(function(){u=!0},function(){u=!1}),x.hover(function(){h=!0,n(),c()},function(){h=!1,c()}),x.bind("touchstart",function(e){e.originalEvent.touches.length&&(g=e.originalEvent.touches[0].pageY)}),x.bind("touchmove",function(e){if(y||e.originalEvent.preventDefault(),e.originalEvent.touches.length){var t=(g-e.originalEvent.touches[0].pageY)/r.touchScrollStep;a(t,!0),g=e.originalEvent.touches[0].pageY}}),l(),"bottom"===r.start?(O.css({top:x.outerHeight()-O.outerHeight()}),a(0,!0)):"top"!==r.start&&(a(e(r.start).position().top,null,!0),r.alwaysVisible||O.hide()),s(),r.mouseOver&&E.trigger("hover"),r.animate?x.animate({scrollTop:delta}):x.scrollTop(delta)}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery);
+/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ * Version: 1.3.4
+ *
+ */
+(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function v(d){if(r){d=d||window.event;
+var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0=b.outerHeight()?k=!0:(c.stop(!0,
+!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.closest("."+a.barClass),h=b.closest("."+a.railClass);x();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",
+q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("").addClass(a.railClass).css({width:a.size,
+height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?
+{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});
+h.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(m((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),
+m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
\ No newline at end of file
diff --git a/package.js b/package.js
index b855202..ab9b9e5 100644
--- a/package.js
+++ b/package.js
@@ -1,6 +1,6 @@
Package.describe({
name: 'rochal:slimscroll',
- version: '1.3.3',
+ version: '1.3.4',
summary: 'jQuery SlimScroll package for meteor.',
git: 'https://github.com/rochal/jQuery-slimScroll',
documentation: 'README.md'
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
index a6bcd84..efbd1e1 100644
--- a/slimScroll.jquery.json
+++ b/slimScroll.jquery.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.3",
+ "version" : "1.3.4",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
From 3f836a9be56b84ddffa1aa37bc61467d889a66f8 Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 14:15:24 +1000
Subject: [PATCH 35/46] Bump up version
---
bower.json | 2 +-
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 2 +-
package.js | 2 +-
slimScroll.jquery.json | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bower.json b/bower.json
index 06075f6..aead77a 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.4",
+ "version" : "1.3.5",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index fad01f0..e49bad0 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.4
+ * Version: 1.3.5
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 113c621..2db66a3 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.4
+ * Version: 1.3.5
*
*/
(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function v(d){if(r){d=d||window.event;
diff --git a/package.js b/package.js
index ab9b9e5..40fa567 100644
--- a/package.js
+++ b/package.js
@@ -1,6 +1,6 @@
Package.describe({
name: 'rochal:slimscroll',
- version: '1.3.4',
+ version: '1.3.5',
summary: 'jQuery SlimScroll package for meteor.',
git: 'https://github.com/rochal/jQuery-slimScroll',
documentation: 'README.md'
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
index efbd1e1..1351791 100644
--- a/slimScroll.jquery.json
+++ b/slimScroll.jquery.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.4",
+ "version" : "1.3.5",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
From 7d25f8901951185e65b5a7cd8a65e5c3c28338c0 Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 14:34:35 +1000
Subject: [PATCH 36/46] Add npm package.json, bump up version
---
bower.json | 2 +-
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 2 +-
package.js | 2 +-
package.json | 31 +++++++++++++++++++++++++++++++
slimScroll.jquery.json | 4 ++--
6 files changed, 37 insertions(+), 6 deletions(-)
create mode 100644 package.json
diff --git a/bower.json b/bower.json
index aead77a..5e64416 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name" : "slimScroll",
- "version" : "1.3.5",
+ "version" : "1.3.6",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index e49bad0..2261a1b 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.5
+ * Version: 1.3.6
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 2db66a3..f41e608 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.5
+ * Version: 1.3.6
*
*/
(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function v(d){if(r){d=d||window.event;
diff --git a/package.js b/package.js
index 40fa567..1aec1fb 100644
--- a/package.js
+++ b/package.js
@@ -1,6 +1,6 @@
Package.describe({
name: 'rochal:slimscroll',
- version: '1.3.5',
+ version: '1.3.6',
summary: 'jQuery SlimScroll package for meteor.',
git: 'https://github.com/rochal/jQuery-slimScroll',
documentation: 'README.md'
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..3e67a4d
--- /dev/null
+++ b/package.json
@@ -0,0 +1,31 @@
+{
+ "name" : "slimScroll",
+ "version" : "1.3.6",
+ "title" : "jQuery slimScroll scrollbar",
+ "description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
+ "keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui", "jquery-plugin", "ecosystem:jquery"],
+ "homepage" : "http://rocha.la/jQuery-slimScroll/",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rochal/jQuery-slimScroll.git"
+ },
+ "author" : {
+ "name" : "Piotr Rochala",
+ "url" : "http://rocha.la/"
+ },
+
+ "dependencies" : {
+ "jquery" : ">= 1.7"
+ },
+
+ "licenses" : [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/mit-license.php"
+ },
+ {
+ "type": "GPL",
+ "url": "http://www.opensource.org/licenses/gpl-license.php"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
index 1351791..0c08bad 100644
--- a/slimScroll.jquery.json
+++ b/slimScroll.jquery.json
@@ -1,9 +1,9 @@
{
"name" : "slimScroll",
- "version" : "1.3.5",
+ "version" : "1.3.6",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
- "keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
+ "keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui", "jquery-plugin", "ecosystem:jquery"],
"demo" : "http://rocha.la/jQuery-slimScroll/",
"homepage" : "http://rocha.la/jQuery-slimScroll/",
"download" : "http://rocha.la/jQuery-slimScroll/",
From e0704eb971e9b5adb2187979f8a92e9677874b81 Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 14:36:37 +1000
Subject: [PATCH 37/46] Update package.json
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 3e67a4d..8dd6c27 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name" : "slimScroll",
+ "name" : "jquery-slimscroll",
"version" : "1.3.6",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
From 52825188661dab1eb39c78f84a70ec2931b55d46 Mon Sep 17 00:00:00 2001
From: rochal
Date: Sun, 7 Jun 2015 14:42:03 +1000
Subject: [PATCH 38/46] Update readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 8042660..bc90347 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
slimScroll is a small jQuery plugin that transforms any div into a scrollable area with a nice scrollbar - similar to the one Facebook and Google started using in their products recently. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over. User can drag the scrollbar or use mouse-wheel to change the scroll value.
-Demo and more: http://rocha.la/jQuery-slimScroll
+Demo and deocumentation available here: [jQuery slimScroll docs](http://rocha.la/jQuery-slimScroll)
Copyright (c) 2011 Piotr Rochala (http://rocha.la)
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
\ No newline at end of file
From d6309d6d18bc1c488df246bd92aef54a422563d2 Mon Sep 17 00:00:00 2001
From: laomao800-pe
Date: Tue, 8 Sep 2015 17:16:52 +0800
Subject: [PATCH 39/46] fix "destroy" can't remove '.slimScrollRail' and
'.slimScrollBar'
---
jquery.slimscroll.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 2261a1b..170d5c4 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -100,8 +100,8 @@
var offset = me.scrollTop();
// find bar and rail
- bar = me.closest('.' + o.barClass);
- rail = me.closest('.' + o.railClass);
+ bar = me.siblings('.' + o.barClass);
+ rail = me.siblings('.' + o.railClass);
getBarHeight();
From 119ad077e3b7a1c99abd9eac54304096a43324ae Mon Sep 17 00:00:00 2001
From: Piotr Rochala
Date: Thu, 19 Nov 2015 20:47:16 +1100
Subject: [PATCH 40/46] Clear up package managers, this is getting ridicilous.
npm ftw.
---
bower.json | 32 --------------------------------
package.js | 13 -------------
slimScroll.jquery.json | 30 ------------------------------
3 files changed, 75 deletions(-)
delete mode 100644 bower.json
delete mode 100644 package.js
delete mode 100644 slimScroll.jquery.json
diff --git a/bower.json b/bower.json
deleted file mode 100644
index 5e64416..0000000
--- a/bower.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name" : "slimScroll",
- "version" : "1.3.6",
- "title" : "jQuery slimScroll scrollbar",
- "description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
- "keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui"],
- "demo" : "http://rocha.la/jQuery-slimScroll/",
- "homepage" : "http://rocha.la/jQuery-slimScroll/",
- "download" : "http://rocha.la/jQuery-slimScroll/",
-
- "main": "./jquery.slimscroll.min.js",
-
- "author" : {
- "name" : "Piotr Rochala",
- "url" : "http://rocha.la/"
- },
-
- "dependencies" : {
- "jquery" : ">= 1.7"
- },
-
- "licenses" : [
- {
- "type": "MIT",
- "url": "http://www.opensource.org/licenses/mit-license.php"
- },
- {
- "type": "GPL",
- "url": "http://www.opensource.org/licenses/gpl-license.php"
- }
- ]
-}
diff --git a/package.js b/package.js
deleted file mode 100644
index 1aec1fb..0000000
--- a/package.js
+++ /dev/null
@@ -1,13 +0,0 @@
-Package.describe({
- name: 'rochal:slimscroll',
- version: '1.3.6',
- summary: 'jQuery SlimScroll package for meteor.',
- git: 'https://github.com/rochal/jQuery-slimScroll',
- documentation: 'README.md'
-});
-
-Package.onUse(function (api) {
- api.versionsFrom('METEOR@0.9.0.1');
- api.use('jquery', 'client');
- api.addFiles('jquery.slimscroll.js', 'client');
-});
diff --git a/slimScroll.jquery.json b/slimScroll.jquery.json
deleted file mode 100644
index 0c08bad..0000000
--- a/slimScroll.jquery.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name" : "slimScroll",
- "version" : "1.3.6",
- "title" : "jQuery slimScroll scrollbar",
- "description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
- "keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui", "jquery-plugin", "ecosystem:jquery"],
- "demo" : "http://rocha.la/jQuery-slimScroll/",
- "homepage" : "http://rocha.la/jQuery-slimScroll/",
- "download" : "http://rocha.la/jQuery-slimScroll/",
-
- "author" : {
- "name" : "Piotr Rochala",
- "url" : "http://rocha.la/"
- },
-
- "dependencies" : {
- "jquery" : ">= 1.7"
- },
-
- "licenses" : [
- {
- "type": "MIT",
- "url": "http://www.opensource.org/licenses/mit-license.php"
- },
- {
- "type": "GPL",
- "url": "http://www.opensource.org/licenses/gpl-license.php"
- }
- ]
-}
\ No newline at end of file
From 00d27e3541d9cb4ada6f41b06cd67bef62d9d2b3 Mon Sep 17 00:00:00 2001
From: Piotr Rochala
Date: Thu, 19 Nov 2015 20:47:23 +1100
Subject: [PATCH 41/46] Bump up version
---
jquery.slimscroll.js | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index c793290..2b26ca0 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.6
+ * Version: 1.3.7
*
*/
(function($) {
diff --git a/package.json b/package.json
index 8dd6c27..4ac6ccf 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name" : "jquery-slimscroll",
- "version" : "1.3.6",
+ "version" : "1.3.7",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui", "jquery-plugin", "ecosystem:jquery"],
From f1e3eeb4c571e77a9abdfaa13186a43611c91025 Mon Sep 17 00:00:00 2001
From: Piotr Rochala
Date: Thu, 19 Nov 2015 20:59:46 +1100
Subject: [PATCH 42/46] Update minified version.
---
jquery.slimscroll.min.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index f41e608..decf42f 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,15 +2,15 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.6
+ * Version: 1.3.7
*
*/
-(function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function v(d){if(r){d=d||window.event;
-var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0=b.outerHeight()?k=!0:(c.stop(!0,
-!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.closest("."+a.barClass),h=b.closest("."+a.railClass);x();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",
-q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("").addClass(a.railClass).css({width:a.size,
-height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?
-{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});
-h.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(m((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),
-m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
\ No newline at end of file
+(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
+var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,e,f){k=!1;var g=d,h=b.outerHeight()-c.outerHeight();e&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),h),g=0=b.outerHeight()?k=!0:(c.stop(!0,
+!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function q(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var p=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
+h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)p=parseInt(a.scrollTo);else if("scrollBy"in f)p+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(p,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;p=e("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
+width:a.width,height:a.height});var m=e("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
+WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(p);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;q();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
+function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){q()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();q()},function(){r=!1;q()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
+x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
\ No newline at end of file
From f730bc6433837ed8c5a15cf5fcb060644db367cd Mon Sep 17 00:00:00 2001
From: Claude Khedhiri
Date: Wed, 25 Nov 2015 16:51:21 +0100
Subject: [PATCH 43/46] add bower.son bump up version
---
.gitignore | 9 ++++++++
bower.json | 46 ++++++++++++++++++++++++++++++++++++++++
jquery.slimscroll.js | 2 +-
jquery.slimscroll.min.js | 2 +-
package.json | 2 +-
5 files changed, 58 insertions(+), 3 deletions(-)
create mode 100644 .gitignore
create mode 100644 bower.json
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..208d3ce
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+### Node template
+node_modules/
+npm-debug.log*
+
+### JetBrains template
+*.iml
+.idea/
+/out/
+.idea_modules/
\ No newline at end of file
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..831eb32
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,46 @@
+{
+ "name": "jquery-slimscroll",
+ "version": "1.3.8",
+ "description": "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
+ "keywords": [
+ "scrollbar",
+ "scroll",
+ "slimscroll",
+ "scrollable",
+ "scrolling",
+ "scroller",
+ "ui",
+ "jquery-plugin",
+ "ecosystem:jquery"
+ ],
+ "homepage": "http://rocha.la/jQuery-slimScroll/",
+ "authors": [
+ { "name": "Piotr Rochala", "homepage": "http://rocha.la/" }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rochal/jQuery-slimScroll.git"
+ },
+ "main": [
+ "jquery.slimscroll.js",
+ "jquery.slimscroll.min.js"
+ ],
+ "licenses" : [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/mit-license.php"
+ },
+ {
+ "type": "GPL",
+ "url": "http://www.opensource.org/licenses/gpl-license.php"
+ }
+ ],
+ "moduleType": [],
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 2b26ca0..90caed3 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.7
+ * Version: 1.3.8
*
*/
(function($) {
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index decf42f..2683487 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
- * Version: 1.3.7
+ * Version: 1.3.8
*
*/
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
diff --git a/package.json b/package.json
index 4ac6ccf..4005577 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name" : "jquery-slimscroll",
- "version" : "1.3.7",
+ "version" : "1.3.8",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
"keywords" : ["scrollbar", "scroll", "slimscroll", "scrollable", "scrolling", "scroller", "ui", "jquery-plugin", "ecosystem:jquery"],
From d5b86d40e424fb00a523ea6509aa73db625eb0d4 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Bidegain
Date: Tue, 15 Dec 2015 09:44:55 +0100
Subject: [PATCH 44/46] Add the main property to the package.json
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index 4005577..147e92d 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
"name" : "jquery-slimscroll",
+ "main" : "jquery.slimscroll.js",
"version" : "1.3.8",
"title" : "jQuery slimScroll scrollbar",
"description" : "slimScroll is a small jQuery plugin that transforms any div into a scrollable area. slimScroll doesn't occupy any visual space as it only appears on a user initiated mouse-over.",
From cf39d364e777ef95574c30c42d3b85cb2bf325d3 Mon Sep 17 00:00:00 2001
From: Piotr Rochala
Date: Sat, 11 Jun 2016 19:19:14 +1000
Subject: [PATCH 45/46] Update minified file
---
jquery.slimscroll.min.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/jquery.slimscroll.min.js b/jquery.slimscroll.min.js
index 2683487..7531ab3 100644
--- a/jquery.slimscroll.min.js
+++ b/jquery.slimscroll.min.js
@@ -6,11 +6,11 @@
*
*/
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
-var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,e,f){k=!1;var g=d,h=b.outerHeight()-c.outerHeight();e&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),h),g=0=b.outerHeight()?k=!0:(c.stop(!0,
-!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function q(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var p=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
-h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)p=parseInt(a.scrollTo);else if("scrollBy"in f)p+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(p,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;p=e("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
+var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0=b.outerHeight()?k=!0:(c.stop(!0,
+!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
+h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
width:a.width,height:a.height});var m=e("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
-WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(p);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;q();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
-function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){q()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();q()},function(){r=!1;q()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
+WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
+function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
\ No newline at end of file
From d01f84978d8c797fa6a9e65616a0d0999aecc183 Mon Sep 17 00:00:00 2001
From: muhammadumairaslam
Date: Tue, 12 Feb 2019 23:40:26 +0500
Subject: [PATCH 46/46] mouse wheel not working on new browser
with the help of below article.
https://stackoverflow.com/questions/14926366/mousewheel-event-in-modern-browsers
---
jquery.slimscroll.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js
index 90caed3..1c6a53b 100644
--- a/jquery.slimscroll.js
+++ b/jquery.slimscroll.js
@@ -392,6 +392,7 @@
{
target.addEventListener('DOMMouseScroll', _onWheel, false );
target.addEventListener('mousewheel', _onWheel, false );
+ target.addEventListener('wheel', _onWheel, false);
}
else
{