功能在分页后不会执行

时间:2012-12-09 11:47:13

标签: jquery html css pagination

这是我正在进行的项目。如果您点击博客on my site,则会显示帖子。现在,如果您点击帖子,将显示该特定帖子的完整视图。但是,由于我在博客帖子页面上应用了简单的分页,因此完整的帖子视图仅适用于第一页。以下是分页循环:

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(隐藏其他所有内容并显示详细帖子)。

1 个答案:

答案 0 :(得分:1)

好吧,我找不到快速加载完整帖子的js片段,但你可能用ie绑定了点击功能。 clickbind函数。但是当加载新的ajax内容时(使用分页),这些处理程序不会附加。请改用onlive功能。

NB;您是否意识到具有低高度(阅读:笔记本电脑)屏幕的用户无法看到分页,因为没有滚动条?