我有一个脚本帽子在ajax之后加载所有数据,在那个响应数据上likeObj('#like'+postid).effect("bounce", {times:1,distance:25},400);
这将给出 likeObj 不是函数的错误。
我该怎么办,帮帮我。
谢谢
if(response=='OK')
{
if(likeval==1)
{
var commentCount=likeobj("#firstPost"+postid+'1').text();
//var newcount=+commentCount + +1;
var newcount=parseInt(commentCount) + parseInt(1);
//likeobj('#like'+postid).effect("bounce", {times:1,distance:25},400);
likeobj("#firstPost"+postid+'1').html("<img alt='Image' src='images/like_icon.gif'> "+newcount);
likeobj("#ullikesuser_"+user_id+"_"+postid).fadeIn(300, function() { likeobj("#ullikesuser_"+user_id+"_"+postid).append(likeobj("<li><?=getUserProfileImage($_SESSION['user_id'])?></li>").attr('id','lilikesuser_'+user_id+'_'+postid)); });
//likeobj("#ullikesuser_"+user_id+"_"+postid).append(likeobj("<li><?=getUserProfileImage($_SESSION['user_id'])?></li>").attr('id','lilikesuser_'+user_id+'_'+postid));
likeobj("#like"+postid).html(showhtml);
}else{
var commentCount=likeobj("#firstPost"+postid+'1').text();
var newcount=parseInt(commentCount) - parseInt(1);
//likeobj('#like'+postid).effect("bounce", {times:1,distance:25},400);
likeobj("#firstPost"+postid+'1').html("<img alt='Image' src='images/like_icon.gif'> "+newcount);
//$(this).fadeOut(500, function() { $(this).remove(); });
likeobj("#lilikesuser_"+user_id+"_"+postid).fadeOut(200, function() { likeobj("#lilikesuser_"+user_id+"_"+postid).remove(); });
likeobj("#like"+postid).html(showhtml);
//likeobj("#like"+postid).html(response);
}
}
.
从ajax得到响应后