Code Monkey home page Code Monkey logo

Comments (6)

bySabi avatar bySabi commented on June 19, 2024 1

I see what you want.
Well react-scrollchor don't handle onMouseEnter, onMouseLeave, on Focus, ... events by it self. You must provided it
See this stackoverflow thread: https://stackoverflow.com/questions/28365233/inline-css-styles-in-react-how-to-implement-ahover

This kinds of behaviour must be handled at navigation components levels using, for example, https://react-bootstrap.github.io/components.html#navigation or similar. But of course you can do it by scratch

from react-scrollchor.

bySabi avatar bySabi commented on June 19, 2024

You can create "after" and "before" scrolled callbacks.

See the API: https://github.com/bySabi/react-scrollchor#before-and-after-animate-callbacks

from react-scrollchor.

talon-himself avatar talon-himself commented on June 19, 2024

Awesome, thank you for the quick reply. Are there any examples of this being used?

from react-scrollchor.

bySabi avatar bySabi commented on June 19, 2024

Take a look a this code: https://github.com/bySabi/react-scrollchor/blob/example/src/App.js#L15
Is the source of:

In this concrete example Sequentially component get refreshed every 1000 ms. You can see that state is set inside _afterAnimate callback function with this._iterator.next().value, iterator is just a helper function that pick a element from an array, ["one", "two", "three"], in a circular way.

I hope this example can illustrate you. Clone the example repo and play with it.

Feel free to ask anything you need.

from react-scrollchor.

talon-himself avatar talon-himself commented on June 19, 2024

Okay I will look it over, I don't want to click a section and scroll back, I just want to be able to highlight/bold the Scrollchor tag element in my navbar when the user is on that section of the page.

from react-scrollchor.

bySabi avatar bySabi commented on June 19, 2024

I will close this for now.

Feel free to reopen is needed.

from react-scrollchor.

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.