I'm facing an issue with my jquery code not working properly when I place it in a separate js file instead of embedding it directly into the html. Currently, my setup looks like this:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="js/responsive.js" media="screen and (max-width: 480px)" defer</script>
Within the "responsive.js" file, my code is as follows:
document.getElementById("navbar").style.display = "none" {
$('#navbar').hide()
}