Вход Регистрация
Файл: InstantSocial/uploud/plugins/p_like/js/p_like.js
Строк: 68
<?php
$(document).ready(function() {
    $(
'.like_href a').each(function() {
        var 
item_id = $(this).attr('item');
        var 
target_id = $(this).attr('target_id');
        $(
this).qtip({
            
style: {
                
width215,
                
padding0,
                
border: {
                    
width1,
                    
radius2,
                    
color'#6D8FB3'
                
},

                
tip: {size: {x20,y8},color'#6D8FB3',corner'bottomMiddle'},
            },


            
content: {
                
url'/plugins/p_like/load.php',
                
data: {req'prev',i_iditem_id,t_idtarget_id},
                
method'post'
            
},
            
position: {
                
corner: {
                    
tooltip"bottomMiddle",
                    
target'topMiddle'
                
}
            },

            
show'mouseover',
            
hide: {fixedtrue,delay1000},
            
classes: {
                
title'tip-title'
            
} ,
            
api:{beforeShow:function(){                 var count=$('.like_href a[item='+item_id+']').attr('count');                 if (count == "") {
                 return 
false;
                 }
            }}



        });
    });

});



function 
addlike(itemtargettitlelinkdep) {
    $.
post('/plugins/p_like/load.php', {req'add',i_iditem,t_idtarget,destitle,tllink,dpdep}, function(resp) {
        if (
resp!="") {
            var 
api = $('.like_href a[item='+item+']').qtip("api");
            
api.updateContent(resp.content);
            $(
'.like_href a[item='+item+']').attr('count',resp.count);
            if(
parseInt($('#item_'+item).text())<parseInt(resp.count)){                  $('#item_' item).animate({top"10px"opacity0.0}, 200)
              .
animate({top"-10px"}, 300, function(){$(this).html(resp.count);})
              .
animate({top"0px"opacity1}, 100)
              .
animate({top"0px"} , 300);             }else{                 if(resp.count!='nan'){                  $('#item_' item).animate({top"-10px"opacity0.0}, 200)
                 .
animate({top"10px"}, 300, function(){$(this).html(resp.count);})
                 .
animate({top"0px"opacity1}, 100)
                 .
animate({top"0px"} , 300);
                 }else{
                 $(
'#item_' item).html('');
                  $(
'.like_href a[item='+item+']').attr('count','');
                  var 
api = $('.like_href a[item='+item+']').qtip("api");
                   
api.hide();
                 }
            }
       }


    },
"json");

}

function 
showAllLike(item,target){   $.post('/plugins/p_like/load.php',{req:'all',i_id:item,t_id:target,page:1},function(resp){     $.modal('<div id="like-modal-win">'+resp+'</div>',{overlayClose:true,minWidth:440,maxWidth:440,minHeight:400});   },'html');

}

function 
loadPageLike(item,target,page_n){     $('#like-modal-win').load('/plugins/p_like/load.php',{req:'all',i_id:item,t_id:target,page:page_n}); }
?>
Онлайн: 1
Реклама