D
D
dika32016-12-27 18:41:58
HTML
dika3, 2016-12-27 18:41:58

Ajax request not working?

That is, I have 2 html files
1 main, 2 auxiliary
And now I need when I click the first button, 1 paragraph 2 html appears, 2 click-2 paragraph
That's something like this
I tried to connect through div, does not want
$ (document). ready (function () {
$("button:first").click(function () {
$.ajax({
type: "GET",
url: "HtmlPage1.html",
success: function (data) {
$("# display").append(html);
}
});
});
$("button:eq(1)").click(function () {
$.ajax({
type: "GET",
url: "HtmlPage1.html",
success: function (data) {
$("div:first").html(data);
}
});
});
$("button:last").click(function () {
$.ajax({
type: "GET",
url: "HtmlPage1.html",
success: function (data) {
$("div:first"). html(data);
2-html
Search Results
Data type - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Data_type
In computer science and computer programming, a data type or simply type is a classification identifying one of various types of data, such as real-valued, ...
Article 2
Article 3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
A person from Kazakhstan, 2016-12-27
@LenovoId

it works on local or remote hosting !
type denwer xampp openserver

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question