我有一个脚本帽加载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获得响应后
答案 0 :(得分:0)
看起来你的代码中没有包含jQuery ui文件。 添加jQuery UI并尝试。
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>