javascript - How to set the active status for a navbar? -


i've tried multiple codes setting active status on navbar menu link, none of them works. found bootply link works: http://bootply.com/70331 , won't work on menu. here's navbar:

     <div class="navbar">   <div class="navbar-inner">     <div class="container">        <!-- .btn-navbar used toggle collapsed navbar content -->       <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">         <span class="icon-bar"></span>         <span class="icon-bar"></span>         <span class="icon-bar"></span>       </a>        <!-- sure leave brand out there if want shown -->       <a class="brand" href="{{ url::to('news/index') }}">emiaac</a>        @include('common.menu_addition')       @include('common.view_special')        <!-- want hidden @ 940px or less, place within here -->       <div class="nav-collapse collapse">         <!-- .nav, .navbar-search, .navbar-form, etc -->         <ul class="nav">           <li><a href="{{ url::to('news/index') }}"><i class="icon-list-alt"></i> news</a></li>            <li class="dropdown">              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-globe"></i> community <b class="caret"></b></a>              <ul class="dropdown-menu">                <li><a href="{{ url::to('characters/search') }}">characters</a></li>                <li><a href="{{ url::to('online') }}">online list</a></li>                <li><a href="{{ url::to('highscores') }}">highscores</a></li>                <li class="divider"></li>                <li class="nav-header">not done</li>                <li><a href="#">forum</a></li>                <li><a href="#">gallery</a></li>                <li class="divider"></li>                <li><a href="#">houses</a></li>                <li><a href="#">guilds</a></li>                <li><a href="#">guild wars</a></li>                <li><a href="#">live casts</a></li>              </ul>           </li>              <li class="dropdown">              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-book"></i> library <b class="caret"></b></a>              <ul class="dropdown-menu">                <li class="nav-header">not done</li>                <li><a href="#">exp. stages</a></li>                <li><a href="#">monsters</a></li>                <li><a href="#">quests</a></li>                <li><a href="#">spells</a></li>              </ul>           </li>              <li class="dropdown">              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-info-sign"></i> <b class="caret"></b></a>              <ul class="dropdown-menu">                <li class="nav-header">not done</li>                <li><a href="#">rules</a></li>                <li><a href="#">support</a></li>              </ul>           </li>   <form id="custom-search-form" class="form-search form-horizontal pull-right" action="{{ url::action('characterscontroller@search') }}" method="get">     <div class="input-append">         <input type="text" class="search-query" name="character" placeholder="character/guild name">         <button type="submit" class="btn"><i class="icon-search"></i></button>     </div> </form>        </div><!-- /.nav-collapse -->       </div>      </div>   </div> </div> 

here example 1 of them

<li class="{{ request::is('characters/*' ) ? 'active' : '' }}"><a href="{{ url::to('characters/search') }}">characters</a></li>


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -