How to create an animated navigation on scroll with Tailwind CSS and JavaScript Read the article, see it live and get the code. — lexingtonthemes.com/tutorials/how-…
Thread
You’re using onscroll here. Have you thought about using the intersection API? I think it may result in less code and use of modern APIs
no, I haven't tried still with that. Still learning js :-)Thank you for the tip Dexter.
This’ll help css-tricks.com/how-to-detect-…
How to Detect When a Sticky Element Gets Pinned | CSS-Tricks
Totally agree with David, on CSS needing a selector to know if a position: sticky; element is doing its sticky thing or not.
css-tricks.com