javascript – 未捕获TypeError:对象[object Object]没有方法’apply’

我在我正在创建的新网站上收到此Uncaught TypeError,但我无法弄清楚导致错误的原因.

我在下面的链接中重新创建了这个问题,如果你看看你的浏览器JS控制台,你会看到发生错误,但没有其他事情发生.

http://jsfiddle.net/EbR6D/2/

码:

$('.newsitem').hover(
$(this).children('.text').animate({ height: '34px' }),$(this).children('.text').animate({ height: '0px'  }));​
最佳答案
一定要将它们包装在异步回调中:

$('.newsitem').hover(
    function() {
        $(this).children('.title').animate({height:'34px'});
    },function() {
        $(this).children('.title').animate({height:'0px'});
    }
);
​

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...