$(document).on('click', '[data-show-more]', function(e){
e.stopPropagation();
var btn = $(this);
var page = btn.attr('data-next-page');
var id = btn.attr('data-show-more');
var bx_ajax_id = btn.attr('data-ajax-id');
var block_id = "#comp_"+bx_ajax_id;
var data = {
bxajaxid:bx_ajax_id,
infinity:1
};
data['PAGEN_'+id] = page;
$.ajax({
type: "POST",
url: window.location.href,
data: data,
timeout: 3000,
success: function(data) {
$("#btn_"+bx_ajax_id).remove();
$('[data-products]').append(data);
//$('body').animate({ "scrollTop" : $('[data-index='+(page-1)+']').offset().top +280 }, 'slow');
}
});
return false;
});