Can't get js to see if html is fully loaded


#1

https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/jquery

It doesn't work. I really don't understand. I even copied and pasted to see if there were any differences. Even retyped the function.

On js:

function main() {
  $(document).ready(main);
}


On html:

<script src='https://code.jquery.com/jquery-3.1.0.min.js'></script>
<script src='js/main.js'></script>

#2

in Js file
correct your function as below.
function main() {

}
$(document).ready(main);


#3

This topic was automatically closed after 7 days. New replies are no longer allowed.