jQuery .get not working

Sjo*_*elt 1 javascript jquery get

每当.information单击该元素时,我都会运行以下代码.我想在单击时将aboutMe.html文档添加到#text元素.information:

$(".information").click( function() {
    $.get("aboutMe.html"), function(data){
        $("#text").html(data);
}});
Run Code Online (Sandbox Code Playgroud)

由于某种原因,.information单击时文档不会添加到页面中.

Bar*_*mar 5

你的括号和括号是错的.它应该是:

$(".information").click( function() {
    $.get("aboutMe.html", function(data){
        $("#text").html(data);
    });
});
Run Code Online (Sandbox Code Playgroud)

你的回调函数在参数列表之外$.get().