I need help with loading function in JQuery
Currently I have links w / class = "ajax" that I want to get in the id = "test" element from the "data.html" file in the same directory and put this content in the id = content "div on my page :
<script>
$(document).ready(function(){
$("a.ajax").click(function(event){
$("#content").load("/data #test");
});
});
</script>
<a class="ajax" href="#">Text</a>
<div id="content"></div>
and externally, but in the same directory, I have data.html:
<div id="test">Will this show up?</div>
When you click on the anchor, Safari reports a "page overload" and no change occurs.
I am definitely calling JQuery on the header. Can I get some help with this feature? Thanks!
+1
a source to share
2 answers