这是我正在做的项目。如果你点击我网站上的博客,那么帖子就会显示出来。现在,如果您单击帖子,将显示该特定帖子的完整视图。但是,由于我在博客文章页面上应用了简单的分页,所以完整的文章视图只能在第一页上使用。以下是分页循环:
jQuery('#Pagination a').live('click', function(e) { //check when pagination link is clicked and stop its action.
e.preventDefault();
var link = jQuery(this).attr('href'); //Get the href attribute
jQuery('#pcontent').fadeOut(500, function() { //fade out the content area
jQuery("#loader").show(); // show the loader animation
}).load(link + ' #pcontent', function() {
jQuery("#loader").hide();
jQuery('#pcontent').fadeIn(500, function() { //load data from the content area from paginator link page that we just get from the top
//hide the loader
});
});
});
整页帖子视图是简单的 jquery show hide(隐藏其他所有内容并显示详细帖子)。