Reputation: 39
Inside clientProfile.html I have a div with class name clientName. And after loading the file inside ajax success, I want to append "hi" to that div, but doesn't work.
JS:
function renderClientProfile() {
$(".wrapper").load("./clientProfile.html");
}
success: function(data) {
renderClientProfile();
$(".clientName").append("hi");
}
Upvotes: 2
Views: 97
Reputation: 14053
Do you mean:
$( ".wrapper" ).load( "./clientProfile.html", function() {
$(".clientName").append("hi");
});
Upvotes: 1