I am experiencing an issue with the side navigation menu. Is there a way to have the side nav instantly open on desktop, while remaining closed on mobile phones? I have tried using the "active" class but the side nav stays closed.
<!DOCTYPE html>
<html lang="en">
<head>
<title>dash</title>
</head>
<body class="active">
<div class="wrapper">
<div class="section">
<div class="top_navbar">
<div class="hamburger">
<a href="#">
<i class="fas fa-bars"></i>
</a>
</div>
</div>
</div>
<div class="sidebar">
<div class="profile">
<div class="brandcolor">
<img src="image/logo.png" alt="profile_picture">
<h3><b>Dashboard</b></h3>
<p><b>admin</b></p>
</div>
</div>
<ul>
<li>
<a href="#">
<span class="icon"><i class="fas fa-desktop"></i></span>
<span class="item">My Dashboard</span>
</a>
</li>
</ul>
</div>
</div>
<script>
var hamburger = document.querySelector(".hamburger");
hamburger.addEventListener("click", function(){
document.querySelector("body").classList.toggle("active");
})
</script>
</body>
</html>