I'm trying to do is load an external html page then display the contents within a div when a button is clicked.
I get the alert message displaying the contents of the test.html, however when I try to display it within a div nothing happens.
The contents is just a div tag. I don't want to load the div tag just the text itself which does come up in the alert message.
Within a html file, I know I don't really need to use ajax for something so simple however if I can get this to work it will help me with future problems.
$.ajax({
type: "GET",
url: "test.html",
dataType: "text",
success : function(data) {
step1j = data;
alert(step1j); // WORKS
return step1j;
}
});
$("#step1").click(function() {
$("#texter").html(step1j);
});