<div class="manage_list">
<a href="javascript:;" class="manage_zan">
<i></i>
<span>点赞(<em class="support_num">0</em>)</span>
<input type="hidden" class="live_type_status" value="oppose">
<input type="hidden" class="live_sup_type" value="live_msg">
<input type="hidden" class="live_sup_id" value="1051331">
</a>
</div>
.manage_list a {
width: 196px;
cursor: pointer;
}
.manage_list a i {
position: absolute;
left: 47px;
top: 4px;
width: 15px;
height: 15px;
background: url(xxxxxxxxxxxxxxxxxxxxxxx) no-repeat;
}
.manage_list a span {
position: absolute;
left: 68px;
color: rgb(102, 102, 102);
font: 12px/22px 微软雅黑;
}
var support_type='',support_id=0,support_status='oppose',flag=0;
$('body').on('click','.manage_zan',function(){
support_type = $(this).parents('.yh_weibo_info1').find('.live_sup_type').val();
support_id=$(this).parents('.yh_weibo_info1').find('.live_sup_id').val();
var statue=$(this).parents('.yh_weibo_info1').find('.live_type_status').val();
var support_num=Number($(this).parents('.yh_weibo_info1').find('.support_num').html());
console.log(support_num)
console.log(support_num+1)
if(statue=='oppose'){
statue='support';
support_status=statue;
$(this).children('span').css('color','red');
$(this).children('i').css('background-position-x','-30px');
$(this).parents('.yh_weibo_info1').find('.support_num').html(support_num+1);
console.log(support_id+':'+support_type+':'+support_status);
$(this).css('pointer-events','none');
$.post(
"xxxxxxxxxxxxxxxxxxxx",
{id:support_id, kind:support_type, type:support_status},
function(data){
console.log(data);
}
);
}
});