我有这个引导侧菜单和 codeigniter 代码,但我想添加一个子菜单或下拉菜单。我尝试了其他解决方案但无济于事,单击时下拉菜单和子菜单不会响应。我希望你能帮助我。Ps 我只找到了这个并稍作修改。
<div class="col-sm-2" id="side-menu">
<div>
<ul class="list-side-menu">
<?php
$location = $this->uri->segment(1);
?>
<li class="list-side-group-item <?php if ($location === 'home' || $location === 'item') {echo 'active-link';}?> ">
<a class="<?php if ($location === 'home') {echo 'active-text';}?>" href="<?php echo base_url("home") ?>">
<span class="glyphicon glyphicon-shopping-cart"></span><br>Order</a>
</li>
<li class="list-side-group-item <?php if ($location === 'home' || $location === 'item') {echo 'active-link';}?> ">
<a class="<?php if ($location === 'home') {echo 'active-text';}?>" href="<?php echo base_url("home") ?>">
<span class="glyphicon glyphicon-folder-close"></span><br>PRODUCTS</a>
</li>
<li class="list-side-group-item <?php if ($location === 'new_item') {echo 'active-link';}?> ">
<a class="<?php if ($location === 'new_item') {echo 'active-link';}?>" href="<?php echo base_url("new_item") ?>"><i class="fa fa-plus fa-big" aria-hidden="true"></i><br>ADD PRODUCT</a>
</li>
<!-- <li class="list-side-group-item <?php if ($location === 'sales') {echo 'active-link';}?>">
<a class="<?php if ($location === 'sales') {echo 'active-link';}?>" href="<?php echo base_url("daily_sales_report") ?>"><span class="glyphicon glyphicon glyphicon-list-alt"></span><br>Sales</a>
</li>-->
<li class="list-side-group-item <?php if ($location === 'categories') {echo 'active-link';}?> "><a class="<?php if ($location === 'categories') {echo 'active-link';}?>" href="<?php echo base_url("categories") ?>"><span class="glyphicon glyphicon glyphicon-tags"></span><br>Categories</a></li>
<li class="list-side-group-item <?php if ($location === 'home' || $location === 'item') {echo 'active-link';}?> ">
<a class="<?php if ($location === 'customer') {echo 'active-text';}?>" href="<?php echo base_url("customer") ?>">
<span class="glyphicon glyphicon-folder-user"></span><br>Customer</a>
</li>
<?php
if ($this->session->userdata('account_type') == 'Admin') {
?>
<li class="list-side-group-item <?php if ($location === 'accounts')
{echo 'active-link';}?> ">
<a class="<?php if ($location === 'accounts') {echo 'active-
link';}?>" href="<?php echo base_url("accounts") ?>">
<span class="glyphicon glyphicon glyphicon-
user"></span><br>USER'S ACCOUNTS</a>
</li>
<?php
}
?>
<li id="log-out" class="list-side-group-item <?php if ($location ===
'logout') {echo 'active-link';}?> "><a href="<?php echo
base_url("logout/out") ?>"><span class="glyphicon glyphicon
glyphicon-log-out"></span><br>Logout</a></li>
</ul>
</div>
</div>