mercredi 31 octobre 2018

Why did not Laravel 5.6 active menu item highlight using request?

working with laravel 5.6 and develop sidemenu bar with bootstarp. I am using request to highlight current menu items here. but it is not highlight when it is in current menu.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style>
 .nav-sidebar li.active{
  /*your css code here*/
 }
</style>
<li class="">
<a href="{!! route('products.index') !!}"><span>Products</span></a>
</li>
<li class="">
<a href="{!! route('tags.index') !!}"><span>Tags</span></a>
</li>
<li class="">
<a href="{!! route('items.index') !!}"><span>Items</span></a>
</li>
<script>

   $('.nav-sidebar').on('click','li', function(){
    $(this).addClass('active').siblings().removeClass('active');
  });
</script>



from Newest questions tagged laravel-5 - Stack Overflow https://stackoverflow.com/questions/53087058/why-did-not-laravel-5-6-active-menu-item-highlight-using-request
via IFTTT

Aucun commentaire:

Enregistrer un commentaire