Question about dividing files


I’m getting the following error in the console when I load my page:

logic.js:5 Uncaught TypeError: document.ready is not a function
    at logic.js:5

Here is the code in my “logic.js” file:

  $("#title").html("NEW TITLE");

Here is my html file:



<title>Randy on Tech</title>

<script src=""></script>

<script src="logic.js"></script>


<h1 id="title">OLD TITLE</h1>



Can anyone see where I’ve gone wrong?


Hi @Flaflaflohi,

Thanks for reaching out to us. I believe you missed out the dollar sign in front of the document parentheses.

Try appending the selector symbol "$" as shown below.

  $("#title").html("NEW TITLE");

Hope this solves the issue.

Happy Learning :slight_smile: