Click here to Skip to main content
15,888,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
THe code for ul:
<div class="collapse navbar-collapse navbar-ex1-collapse">
                 <ul class="nav navbar-nav navbar-right">
                   <li class="active"><a href="#juk">About</a></li>
                   <li><a onclick="myFunction1()">Development</a></li>
                   <li><a href="http://docs.kde.org/stable/en/kdemultimedia/juk/index.html">Wiki/Documentation</a></li>
                   <li><a onclick="myFunction()">Screenshots</a></li>
                   <li class="dropdown">
                     <a data-toggle="dropdown" class="dropdown-toggle" href="#">Releases class="caret"></a>
                     <ul class="dropdown-menu">
                       <li><a href="ftp://ftp.kde.org/pub/kde/stable/latest">JuK Latest</a></li>
                       <li><a href="http://developer.kde.org/~wheeler/files/src/juk-1.95a.tar.gz">JuK 1.95</a></li>
                       <li><a href="http://developer.kde.org/~wheeler/files/src/juk-1.1.tar.gz">JuK 1.1</a></li>
                       <li><a href="http://developer.kde.org/~wheeler/files/src/juk-1.0-1.tar.gz">JuK 1.0</a></li>
                     </ul>
                   </li>
                   <li><a href="#contactus">Contact Us</a></li>
                 </ul>
               </div>


What I have tried:

$(function() {
      $( 'ul.nav.navbar-nav.navbar-right li' ).on( 'click', function() {
            $( this ).parent().find( 'li.active' ).removeClass( 'active' );
            $( this ).addClass( 'active' );
      });
});
Posted
Updated 8-Dec-18 23:30pm
v3
Comments
Bryian Tan 9-Dec-18 18:06pm    
what the problem?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900