I try to resfresh a div without refresh a full page. the code :
$(document).ready(function() {
$(".ext").on('click',function(event) {
var url = $(this).prop('href');
$("#change").load(url);
event.preventDefault();
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="page1.html" class="ext">page 1</a>
<a href="page2.php" class="ext">page 2</a>
<div id="change">
<a href="page3.html" class="ext">page 3</a>
<a href="page4.php" class="ext">page 4</a>
</div>
for resfresh page1 and page2 no problem. But when I want to resfresh page3 and page 4 all page is resfreshing. I don't find the solution. Can' you help me?
ps : sorry, I'am french and my language is bad.