Creating HTML Elements


Why isn't this working?


I keep getting a message saying I didn't create the variable $h1.


function() is missing in document.ready()


That worked. I was able to get through the other exercises without that portion, though.


That is because the lesson checker didn't expect it, and it was not needed. From here on you will be using the callback that .ready depends upon to handle the document content loaded event.

.ready() is a listener. Listeners are not able to handle the events they hear, so must hand off that task to another function. That is why,

$(document).ready(function () {
    // handler code


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