function initialize_map() { }
jQuery(document).ready(function ($) {
var total = 1; var ajax = true; var count = 2;
$('.p-btn').click(function () {
jQuery(this).addClass('active2'); if (ajax) { if (count > total + count) { return false; } else { if ($("div").is(".no_posts_1")) return; loadArticle(count); count++;
} ajax = false; } return false;
});
function loadArticle(pageNumber) {
var ofset = $(".projects_block ").length; var posttype = "projects"; var cat = ""; var is_sticky = ""; var tag = ''; var order = 'ASC'; var orderby = 'ASC';
jQuery('.p-btn').attr('disabled', true);
$.ajax({ url: "https://kensington.az/wp-admin/admin-ajax.php", type: 'POST', data: "action=goarch_infinite_projects_scroll&page_no=" + pageNumber + "&ofset=" + ofset + "&cat=" + cat + '&tag=' + tag + '&order='+order +'&orderby='+orderby+ '&type=1&img_type=2' + "&is_sticky=" + is_sticky + "&post_per_page=7" + "&term=all", success: function (html) {
var $moreBlocks = jQuery(html).filter('.project_item'); jQuery(".projects_block").append($moreBlocks);
ajax = true;
jQuery('.p-btn').attr('disabled', false); } }); return false; }
});