Expand Colapse Button not working
Opened this issue · 3 comments
mabaega commented
Looklike BlazorAdmin2/wwwroot/js/sb-admin-2.js not working. Make it working please... Ty.
BinkyBonkers commented
Can you please be a bit more specific? What error are you getting, which browser are you using, etc.
Thanks
lajith111 commented
get-code-ch commented
To solve it create a javascript function to toggle collapse:
function toggleCollapse() {
$("body").toggleClass("sidebar-toggled");
$(".sidebar").toggleClass("toggled");
if ($(".sidebar").hasClass("toggled")) {
$('.sidebar .collapse').collapse('hide');
};
};
And modify Sidebar Toggler element in SidebarNav.razor
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle" onclick="toggleCollapse()"></button>
<!--
<button class="rounded-circle border-0" id="sidebarToggle"></button>
-->
</div>