fbpx
🎉 Apply WELCOME10 at checkout to get 10% off on entire store 🎉. Dismiss
Sale Ends In
  • 00Hours
  • 00Minutes
  • 00Seconds

test

Introduction

Scrollspy is a navigation mechanism that automatically updates links in a navigation list based on scroll position to indicate which section is currently active in the viewport.

This implementation features a fixed navigation panel on the right side of the page that highlights the current section as you scroll through the content.

Each section is designed to be visually distinct with subtle hover effects and smooth transitions.

How It Works

The scrollspy functionality is implemented using JavaScript that monitors the scroll position and determines which section is currently in view.

When a section enters the viewport, the corresponding navigation link is highlighted with an active state.

The navigation panel remains fixed on the right side of the screen, providing easy access to all sections at any time.

Implementation Details

This scrollspy uses:

  • HTML5 for semantic structure
  • CSS3 for styling and animations
  • Vanilla JavaScript for the scrollspy logic

The code is lightweight and doesn’t require any external libraries or frameworks.

It’s fully responsive and will adapt to different screen sizes.

Customization Options

You can easily customize this scrollspy by:

  • Changing colors in the CSS variables
  • Adjusting the animation timing
  • Modifying the navigation position
  • Adding or removing sections

The structure is modular and easy to extend with additional functionality.

Browser Compatibility

This scrollspy works in all modern browsers including:

  • Chrome
  • Firefox
  • Safari
  • Edge

For older browsers, some features may need polyfills for full functionality.

The responsive design ensures a good experience on mobile devices as well.

Conclusion

Scrollspy navigation enhances user experience by providing visual feedback about the current reading position.

The right-side placement is ideal for long articles and documentation where quick navigation is important.

Feel free to use this implementation as a starting point for your own projects.

Price


Min Price:

Max Price:

Choose Color

Material

Frame Type

Size

Search samandmarshalleyewear.in

Login

Create an account

Password Recovery

Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.

SHOPPING BAG (0)

Select an available coupon below
Do you need Lens advice?

Tinted Lenses

Stock lens are pre-fitted zero power lens that come with your eyeglasses. They do not have any special properties but can be used for general purposes but not as power lens or any protective lenses.

Polarized Lenses

Polarized lenses are designed to reduce glare from reflective surfaces such as water, roads, and glass, making them ideal for outdoor sports, driving, and other bright environments. They improve visual clarity, reduce eye strain, and offer full UV protection, making them the top choice for those who prioritize performance and protection in bright conditions.

NOTE: In case of any Prescription Eyeglasses/Sunglasses, no return/refund will be offered for customized lens. If wrong prescription values are entered at the time of order, or any other issue from customer end, the refund will not be done.

  • Single vision lenses are a type of glasses lens that correct vision for a single distance. That means that they work for people that are nearsighted or farsighted, but not for those who are both.
  • Denoting a lens having two parts each with a different focal length, one for distant vision and one for near vision.
  • These lens are similar to bifocals but do not have a seperation line in between. The power changes from point to point on lens
Do you need Lens advice?

Stock Lens (FREE)

Stock lenses are pre-fitted, non-prescription lenses included with your eyeglasses at no extra cost. These lenses are suitable for general use but do not offer vision correction or specialized protection. They are not intended to serve as power lenses or protective eyewear.

Blue-Cut Lens with Zero Power

Sam & Marshall’s Blue-Cut lenses (zero power) are designed to shield your eyes from harmful blue light emitted by digital screens such as TVs, smartphones, and laptops. By filtering out blue light, these lenses help reduce eye strain, fatigue, and stress caused by prolonged screen exposure. They are ideal for those who spend significant time on digital devices and are looking to prevent potential long-term vision-related issues.
NOTE: For prescription eyeglasses or sunglasses with customized lenses, returns and refunds are not available. If incorrect prescription values are entered or if any issue arises from the customer’s end, refunds will not be processed
  • Single vision lenses are a type of glasses lens that correct vision for a single distance. That means that they work for people that are nearsighted or farsighted, but not for those who are both.
  • Denoting a lens having two parts each with a different focal length, one for distant vision and one for near vision.
  • These lens are similar to bifocals but do not have a seperation line in between. The power changes from point to point on lens

Hardcoat Lens


Scratch resistant coating or hard coating provide lenses with durability and increased longevity. A high quality thermally cured hardcoat provides the best scratch resistance.

Thin Lens with Blue-Cut

Our Thin Blue-Cut lenses combine the same blue light-blocking benefits with a lightweight, slim design. These lenses are especially recommended for individuals with higher prescription powers, as they reduce the bulk and weight commonly associated with thicker lenses. Their sleek profile provides a more comfortable fit and a stylish, discreet look. Perfect for anyone seeking enhanced comfort, durability, and protection from blue light, especially during long hours in front of screens.Our Thin Blue-Cut lenses combine the same blue light-blocking benefits with a lightweight, slim design. These lenses are especially recommended for individuals with higher prescription powers, as they reduce the bulk and weight commonly associated with thicker lenses. Their sleek profile provides a more comfortable fit and a stylish, discreet look. Perfect for anyone seeking enhanced comfort, durability, and protection from blue light, especially during long hours in front of screens.

Antiglare Lens


Scratch resistant coating or hard coating provide lenses with durability and increased longevity. A high quality thermally cured hardcoat provides the best scratch resistance.


Scratch resistant coating or hard coating provide lenses with durability and increased longevity. A high quality thermally cured hardcoat provides the best scratch resistance.

Photochromic Lens


Photochromic lenses are eyeglass lenses that darken when exposed to UV light and lighten when the UV light is removed. They are popular for outdoor activities as they provide protection from the sun's harmful UV rays while still allowing for clear vision in different lighting conditions. Photochromic lenses are available in both prescription and non-prescription forms and can be used for both eyeglasses and sunglasses.