The following classes will be added to the body element based on scroll and device detection:
Check the body element classes in the developer tools while scrolling.
ESM format usage example (via npm or direct import)
<script type="module">
import { IsScrolled, IsDevice } from './dist/is.min.js';
document.addEventListener('DOMContentLoaded', () => {
const isScrolled = new IsScrolled();
isScrolled.init();
const isDevice = new IsDevice();
isDevice.init();
});
</script>
For browser direct usage example, see browser.html.