Isolate Scroll supports all browsers that are ES5-compliant (IE8 and below are not supported).
Isolate Scroll also prevent parent scroll in mobile browsers.
With a package manager (recomanded):
npm install isolate-scroll --save
Download this library from https://github.com/AleeeKoi/isolate-scroll/releases
As ES6 module
;var target = '.target-element';// or:// var target = document.querySelector('.target-element');var isolateScrollInstance = target;
Including directly as library
On inizialization this library caches some values, if DOM changes or is resized you need to manually call following method:
Copyright (c) 2019-present, Alessandro Pellizzari