我只是将我的jquery从1.10.3更新到3.1.1。 然后我不断在每个页面上收到此错误。环顾四周后,似乎jquery多次执行。
所以,这就是它发生的地方。
$overlay.
hide().
fadeIn( configs.fadeIn, function(){
$content.fadeIn( 'fast' ).children().andSelf().bind( 'click', function( e ){
e.stopPropagation();
});
在线$content.fadeIn( 'fast' ).children().andSelf()
它有警告 -
jQuery.Deferred异常:$content.fadeIn( 'fast' ).children().andSelf()
不是函数。
所以我将andSelf()
更新为addBack()
,因为jquery 3.1.1不支持andSelf()
。但我仍然收到错误$content.fadeIn( 'fast' ).children().addBack()
不是函数。
知道为什么会这样吗?