 <p>You have two class attributes on each of your menu items. The second one is being ignored by jQuery.</p> <pre><code>&lt;a class="list-group-item allnotif" href="#allnotif"&gt;&lt;strong&gt;Alle Notificaties&lt;/strong&gt;&lt;/a&gt; </code></pre> <p><strong><a href="https://jsfiddle.net/3puygh7h/" rel="nofollow">Working demo</a></strong></p>