how to load content from another page using ajax
ajax, html, jquery, php
Solution
Have a look at jQuery's `load`, the section on loading page fragments:
The .load() method, unlike $.get(), allows us to specify a portion of the remote document to be inserted.
To get the div content on another page into an analogous div on the current page, use something like:
$('#content').load('other-page.php #content');
// ^ target div ^ same div on the other page
Problem
hi i am a new programer i want to replace the content of current php page from another php page using ajax without refreshing page. the content to be replaced is in div's. both pages (current and another) has same div's HTML Div's are: ``` <div class="category-container"> <div class="category-image"></div> <div class="category-desc"><a href="#">#</a><p>text</p></div> <div class="rating5" >Editors' rating: </div> <div class="category-download-btn"><a href="#">Download</a></div> <div class="category-buy-btn"><a href="#">Buy</a></div> </div> ``` can anyone tell me how i can do it. it will be a great help. also can you provide me ajax code not jquery. thanks.