Git Product home page Git Product logo

Comments (4)

makotot avatar makotot commented on August 20, 2024

@aziz-boudi4 Sorry for the late reply.

The titles in my nav bar are not being highlighted once I scroll to a specific "Section"

Could you be more specific?

instead of jumping right away to the clicked section, can it instead scroll down and not jump directly to the selected html section ?

No, at least for now. Jumping directory to the selected section is the bahavior of HTML internal link, not by JavaScript.

from react-scrollspy.

aziz-boudi4 avatar aziz-boudi4 commented on August 20, 2024

@makotot Thanks for replying.
Let's say I have 5 sections, would it be possible to highlight the section's title in my nav bar when I'm in the appropriate section ?

  • I am using a sticky div that is fixed to the top of the screen and it contains my nav bar with all the sections titles.
  • Is it possible to highlight the title or change its color when the user is seeing the appropriate section.
  • Example: If I'm seeing section2 on my screen, can section title become highlighted ?

from react-scrollspy.

makotot avatar makotot commented on August 20, 2024

@aziz-boudi4
Hmm, could you show me an example code ? or is it public on github ? I cannot reproduce it.

from react-scrollspy.

bethwickerson avatar bethwickerson commented on August 20, 2024

add the following css:
html { scroll-behavior: smooth; }

from react-scrollspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.