rgalus / sticky-js

Library for sticky elements written in vanilla javascript
https://rgalus.github.io/sticky-js/
MIT License
731 stars 191 forks source link

StickyJS works only in Chrome #79

Open mrkkr opened 4 years ago

mrkkr commented 4 years ago

Hello, I have implemented as documented and sticky-js works only in Chrome. On FF, Edge, EI11 doesn't run the script at all. Optional attributes are in HTML tags.

My code:

import Sticky from "sticky-js/dist/sticky.compile";

    const stickySidebarFunc = () => {
        new Sticky(".sidebar__content", {});
    };

    document.addEventListener("DOMContentLoaded", () => {
        const stickyForm = document.querySelector(".sidebar__content");

        stickyForm ? stickySidebarFunc() : null;
    });
Manoz commented 4 years ago

Working on FF for me