When I put jquery code in the body of my php file it works, however when I put it in a seperate file and link it then it doesnt work? any ideas?
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<p>hello</p>
</body>
</html>
and here is my javascript file.
$(document).ready(function(){
$("p").click(function(){
$("p").hide();
});
});