How to change the color of Navbar according to each section?

Asked

Viewed 113 times

1

all right? So I’m having a hard time changing the background color of Navbar according to every Section I visit in Html with Scrollbar through JQUERY. Navbar is fixed. The code goes something like this:

<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
</nav>

<section id="section1" class="section1">
</section>

<section id="section2" class="section2">
</section>

When the scroll arrives at Section 2 the color of the navbar changes. Someone could help me with a code in Jquery that does this?

Thanks in advance :)

  • Hi, if my question is duplicated show me the other? I want to know the question to my doubt. vlw boss

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.