Create websites with TailwindCSS
Design blocks for your website
Start building the next great SAAS
Alpine & Tailwind UI Library
Plug'n Play Authentication for Laravel
Create website designs with AI
Blog platform for developers
Build a simple static website
21-day program to build a SAAS
var top = window.pageYOffset || document.documentElement.scrollTop,
left = window.pageXOffset || document.documentElement.scrollLeft;
I'm hoping to find a way to get the current viewable window's position (relative to the total page width/height) so I can use it to force a scroll from one section to another. However, there seems ...
Here is what the above code is doing:
1. Get the top and left position of the window
2. Get the scroll position of the window
3. Get the top and left position of the div
4. Subtract the scroll position from the top and left position
5. Add the scroll position to the