laravel如何在同一页面上单击菜单按钮

时间:2017-11-14 10:27:00

标签: php laravel

我右边有菜单,想点击特定项目按钮特定页面时显示,如果只点击这个项目按钮我怎么能包括

<a href="{{route('customer.package')}}">
    <i class="icon-shopping-cart"></i>
    <span>Update Your Package</span>
</a>        
@include('index.customer.customerpackage')

2 个答案:

答案 0 :(得分:0)

你可以使用jquery。像:

<a class="custom-menu" href="{{route('customer.package')}}" style="display:none;">
                      <i class="icon-shopping-cart"></i>
                      <span>Update Your Package</span>
                  </a>
<button id="button">Click</button>
<javascript>$(document).ready(function(){$('#button').click(function(){
$('.custom-menu').show();
});})</javascript>

答案 1 :(得分:0)

<a class="btn btn-primary" href="{{route('customer.package')}}"">
   <i class=""></i>
   <span>Update Your Package</span>
</a>