How on jquery can I remove a block and load it instead (you can copy it) from another page?
I do not want to use php for the buffering method.

For example, on page 1.html there is one div with content. And on page 2.html another block div.

How to remove the block on the first page without using php and copy the block from the second page instead?

  • What are at least one reason why you do not want to use php? Because other methods, not only, perhaps not working , but also quite difficult to implement - ThisMan

1 answer 1

Via ajax:

$.get("/2.html #novosti", function(data) { $("#novosti").replaceWith(data); });