diff --git a/src/perfect-scrollbar.css b/src/perfect-scrollbar.css index ea39d37..d81bc97 100644 --- a/src/perfect-scrollbar.css +++ b/src/perfect-scrollbar.css @@ -80,10 +80,6 @@ transition: background-color .2s linear; } -.ps-container.ie6 .ps-scrollbar-x { - font-size: 0; /* fixed scrollbar height in xp sp3 ie6 */ -} - .ps-container .ps-scrollbar-x-rail:hover .ps-scrollbar-x, .ps-container .ps-scrollbar-x-rail.hover .ps-scrollbar-x { background-color: #999; @@ -103,23 +99,7 @@ transition: background-color .2s linear; } -.ps-container.ie6 .ps-scrollbar-y { - font-size: 0; /* fixed scrollbar height in xp sp3 ie6 */ -} - .ps-container .ps-scrollbar-y-rail:hover .ps-scrollbar-y, .ps-container .ps-scrollbar-y-rail.hover .ps-scrollbar-y { background-color: #999; } - -.ps-container.ie .ps-scrollbar-x, -.ps-container.ie .ps-scrollbar-y { - visibility: hidden; -} - -.ps-container.ie:hover .ps-scrollbar-x, -.ps-container.ie:hover .ps-scrollbar-y, -.ps-container.ie.hover .ps-scrollbar-x, -.ps-container.ie.hover .ps-scrollbar-y { - visibility: visible; -} diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 148366d..212b226 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -631,61 +631,9 @@ eventClassName = null; } - function ieSupport(version) { - $this.addClass('ie').addClass('ie' + version); - - function bindHoverHandlers() { - function mouseenter() { - $this.addClass('hover'); - } - function mouseleave() { - $this.removeClass('hover'); - } - $this.bind('mouseenter' + eventClassName, mouseenter).bind('mouseleave' + eventClassName, mouseleave); - $scrollbarXRail.bind('mouseenter' + eventClassName, mouseenter).bind('mouseleave' + eventClassName, mouseleave); - $scrollbarYRail.bind('mouseenter' + eventClassName, mouseenter).bind('mouseleave' + eventClassName, mouseleave); - $scrollbarX.bind('mouseenter' + eventClassName, mouseenter).bind('mouseleave' + eventClassName, mouseleave); - $scrollbarY.bind('mouseenter' + eventClassName, mouseenter).bind('mouseleave' + eventClassName, mouseleave); - } - - function fixIe6ScrollbarPosition() { - updateCss = function () { - var scrollbarXStyles = { left: scrollbarXLeft + $this.scrollLeft(), width: scrollbarXWidth }; - if (isScrollbarXUsingBottom) { - scrollbarXStyles.bottom = scrollbarXBottom; - } else { - scrollbarXStyles.top = scrollbarXTop; - } - $scrollbarX.css(scrollbarXStyles); - - var scrollbarYStyles = { top: scrollbarYTop + $this.scrollTop(), height: scrollbarYHeight }; - if (isScrollbarYUsingRight) { - scrollbarYStyles.right = scrollbarYRight; - } else { - scrollbarYStyles.left = scrollbarYLeft; - } - - $scrollbarY.css(scrollbarYStyles); - $scrollbarX.hide().show(); - $scrollbarY.hide().show(); - }; - } - - if (version === 6) { - bindHoverHandlers(); - fixIe6ScrollbarPosition(); - } - } - var supportsTouch = (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch); function initialize() { - var ieMatch = navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/); - if (ieMatch && ieMatch[1] === 'msie') { - // must be executed at first, because 'ieSupport' may addClass to the container - ieSupport(int(ieMatch[2])); - } - updateGeometry(); bindScrollHandler(); bindMouseScrollXHandler();