Wordpress在鼠标滚轮上加载下一页

I want to implement this page in Wordpress: http://www.spendeeapp.com/
Basically, the loading next post on mousescroll functionality

I can replicate the mousescroll action thru jQuery

$(document).ready(function(){
    $(document)
        .on('mousewheel DOMMouseScroll swipedown swipeup', function(){
            // Do something
        })
});

PHP:

<div id="content">
            <h1>Main Area</h1>
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <h1><?php the_title(); ?></h1>
                <h4>Posted on <?php the_time('F jS, Y') ?></h4>
                <p><?php the_content(__('(more...)')); ?></p>
                <hr> <?php endwhile; else: ?>
                <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
        </div>

My question is, how can I load the next post thru the event, and display the loaded post.

查看全部
douhao7677
douhao7677
2016/09/12 22:45
  • wordpress
  • php
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复