So, I have written this code in HTML and I am trying to use basic JQuery function like hide(). While the inline JQuery is working properly , the external JQuery code for the same does not work at all. Here's the code for the HTML file-
<html>
<head>
<script src="jq.js"></script>
<script src="JS.js"></script>
</head>
<body>
<p id='paragraph'>This is a paragraph</p>
<p onclick="$(this).hide()">This is second</p>
</body>
</html>
code for the jq.JS fiel which where external JQuery code is -
$('#paragraph').click(function(){
$('#paragraph').hide();
});