You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using barba.js to manage transitions between pages and lenis for smooth scroll. My site is working as a one page application in javascript so I have to manage all the scripts initialization when I change pages, adding/deleting listeners, parsing the dom to make all works. I was wondering if I can programmatically prevent lenis on html element in same way.
I need the same behavior of data-lenis-prevent but programmatically or I would like to know if exist a method to parse the dom to find data-lenis-prevent elements and start again the script to prevent that.
if not, do you know what exactly do the data-lenis-prevent attribute? Maybe I can make on my own with some indications. Thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am using barba.js to manage transitions between pages and lenis for smooth scroll. My site is working as a one page application in javascript so I have to manage all the scripts initialization when I change pages, adding/deleting listeners, parsing the dom to make all works. I was wondering if I can programmatically prevent lenis on html element in same way.
I need the same behavior of data-lenis-prevent but programmatically or I would like to know if exist a method to parse the dom to find data-lenis-prevent elements and start again the script to prevent that.
if not, do you know what exactly do the data-lenis-prevent attribute? Maybe I can make on my own with some indications. Thanks
Beta Was this translation helpful? Give feedback.
All reactions