Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var page = 2;
- jQuery(function($) {
- $('body').on('click', '.loadmore', function() {
- var data = {
- 'action': 'load_posts_by_ajax',
- 'page': page,
- 'security': blog.security
- };
- $.post(blog.ajaxurl, data, function(response) {
- if(response != '') {
- $('.rowtest').append(response);
- page++;
- } else {
- $('.loadmore').hide();
- }
- });
- });
- });
Add Comment
Please, Sign In to add comment