I’m trying to make sure that my JQuery ready function is working. In the long run, I want to be able to load an image once the page loads, but for now, I am trying it merely with text, and it is not working. Here is my code.
//inside my html
<div id= "person_image">
<p> has not been replaced </p>
</div>
//the ready function... this is in another file, but I know it is accessing properly
//the made it text is displaying as it should
$(document).ready(function(){
alert("made it");
$("person_image").html("<p> replacement string </p>");
});
Whenever I reload the page, nothing is changed and it still reads “has not been replaced”. Am I doing something wrong with the JQuery ready function?
You forgot the ‘#’!
should be: