I have a web page made of 6 different sections, and a fixed navbar with the titles of each section. When scrolling through the page, the user sees one section, and then the next, etc.
I'd like to make it so that when the user is over a section, the related title in the navbar would go bold, much like in this website where it changes color: http://www.psychologue-paris16.com/
Does anyone know how to do this?
Here's my navbar:
<nav class="navbar navbar-expand-lg navbar-light text-black fixed-top">
<a class="navbar-brand" href=""><strong>Hélène Levy-Borrel</strong></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor03" aria-controls="navbarColor03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor03">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link scrollLink" href="#therapy">Title 1</a>
</li>
<li class="nav-item">
<a class="nav-link scrollLink" href="#consult">Title 2</a>
</li>
<li class="nav-item">
<a class="nav-link scrollLink" href="#modalities">Title 3</a>
</li>
<li class="nav-item">
<a class="nav-link scrollLink" href="#method">Title 4</a>
</li>
<li class="nav-item">
<a class="nav-link scrollLink" href="#background">Title 5</a>
</li>
<li class="nav-item">
<a class="nav-link scrollLink" href="#contact">Title 6</a>
</li>
</ul>
</div>
</nav>
And my homepage:
<%= render 'jumbotron' %>
<div class="content">
<%= render 'Section 1' %>
<%= render 'Section 2' %>
<%= render 'Section 3' %>
<%= render 'Section 4' %>
<%= render 'Section 5' %>
<%= render 'Section 6' %>
</div>