这个示例并没有完全展示问题,只是为了给大家一个概念。比如说,当我点击第二页时,内容不会在DIV中加载,我必须刷新页面才能看到第二页的内容。
P.S:同样的代码在其他页面也有重复。
代码:
$(document).ready(function() {
$('.content-primary').html("Content of page 1"); // This line just in this example
//$(".content-primary").load("content-of-page.php"); // but I used this code on all my pages
});