我正在尝试确保我的 JQuery 就绪功能正常工作。从长远来看,我希望能够在页面加载后加载图像,但现在,我只是在尝试使用文本,但它不起作用。这是我的代码。
//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>");
});
每当我重新加载页面时,什么都没有改变,它仍然显示“没有被替换”。我对 JQuery 就绪功能做错了吗?