I have a div with text that I'm trying to replace using Javascript. It works in JFiddle, but not in my Javascript and HTML files for some reason. I can't understand why.
Here's a link to the JSFidle: https://jsfiddle.net/ZEZEME/wgt0ayqe/1/
Here's my actual code:
test.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="test.js"></script>
</head>
<body>
<div id="parkLinks"><span></span></div>
</body>
</html>
test.js
$('#parkLinks span').text("Hi I am replace");
As you can see, it's very simple, but it doesn't work. The page is empty instead of showing "Hi I am replace"