diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 0917834..33ccbfd 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -93,6 +93,7 @@ var isRtl = $this.css('direction') === "rtl"; var eventClassName = getEventClassName(); + var ownerDocument = this.ownerDocument || document; var $scrollbarXRail = $("