I am having problems running a simple jQuery script in an external js file.
$("#main-nav").click(function(){
alert("hello");
});`
I declared the external js file here in my html after the jQuery file.
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="externalfile.js"></script>`
Nothing happens when I load the page and I get no errors in the console.