Вход Регистрация
Файл: system/AJAX/show_more.js
Строк: 23
<?php
function show_more(link, id, id_upgrade, add) {

  var 
count_show = parseInt($(id).attr('count_show'));
  var 
count_add = $(id).attr('count_add');
  
  $(
id).html('<i class="fa fa-spinner fa-spin fa-fw"></i> Ждите...');
    
   $.
ajax({
      
      
url: link,
      
type: "post",
      
dataType: "json",
      
data: {
        
"count_show": count_show,
        
"count_add": count_add
      
},
      
success: function(data){
        
        if(
data.result == "success"){
          
          $(
id_upgrade).append(data.html);
          $(
id).html('Показать еще');
          $(
id).attr('count_show', (count_show + add));
        
        }else{
          
          $(
id).html('Конец');
        
        }
      
      }
    
    });
  
}
?>
Онлайн: 3
Реклама