Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Payroll is Main Menu. and New Pay and Payment records of Sub menus.

Payroll
New Pay
Payment Records

When i am Click Payroll. not show the submenu's

How can i get the Payroll of the submenus.

What I have tried:

HTML
<li class="nav-item">
    <a class="nav-link" data-toggle="collapse" href="#Payroll" aria-expanded="false" aria-controls="ui-basic">
        <i class="fas fa-pound-sign fa-lg text-primary" style="margin-right: 0.7em"></i>
        Payroll
        <i class="menu-arrow text-primary"></i>
    </a>
    <div class="collapse" id="Payroll">
        <ul class="nav flex-column sub-menu">
            <li class="nav-item"><a class="nav-link" asp-controller="Pay" asp-action="Create"> New Pay</a></li>
            <li class="nav-item"><a class="nav-link" asp-controller="Pay" asp-action="Index"> Payment Records</a></li>
        </ul>
    </div>
</li>

I am using these versions of files. not show any errors
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js" asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js" asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
</script>
Posted
Updated 23-Nov-22 0:03am
v4
Comments
Richard Deeming 23-Nov-22 4:01am    
Which version of Bootstrap are you using? Have you included all of the required Javascript files? Are there any errors in the browser developer console?
2011999 23-Nov-22 4:46am    
I am used these version of files used. but not show any errors

Richard Deeming 23-Nov-22 4:58am    
That version is so old, the docs no longer include it. Looking at the v3.4 docs[^], there doesn't seem to be anything wrong with your markup.

1 solution

<li class="nav-item">
                       <a class="nav-link" data-bs-toggle="collapse" href="#Employee" aria-expanded="false" aria-controls="ui-basic">
                           class="fas fa-users fa-lg text-primary" style="margin-right: 0.7em">
                           Employee
                           ^__i class="menu-arrow text-primary">
                       </a>
                       <div class="collapse" id="Employee">
                           <ul class="nav flex-column sub-menu">
                               <li class="nav-item"><a class="nav-link" asp-controller="Employee" asp-action="Create"> New Employee</a></li>
                               <li class="nav-item"><a class="nav-link" asp-controller="Employee" asp-action="Index"> All Employees</a></li>
                           </ul>
                       </div>
                         </li>
 
Share this answer
 
Comments
Richard Deeming 23-Nov-22 6:23am    
That's the markup for Bootstrap 5, which is not the version you said you were using.

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