This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance navigation with smooth scroll to specific elements
This commit introduces changes to the directive.js and ProductQuery.php files. In directives.js, the functionality of fetching a page and updating scroll behavior is enhanced. Now, apart from the smooth or default scroll, the function also considers the 'scrollToSelector' property of a link. It calculates the top position of the element (identified by the selector) in the viewport and uses it for scrolling, providing a more precise and user-friendly scrolling experience. In ProductQuery.php, the navigation link payload is updated to include a 'scrollToSelector' attribute. This attribute uses a data attribute selector that identifies the product block that the navigation link should scroll to. These enhancements improve user navigation by allowing smooth scrolling to specific product blocks rather than just the top of the page.
- Loading branch information