TypeError:p.easing [this.easing]不是函数 [英] TypeError: p.easing[this.easing] is not a function

查看:296
本文介绍了TypeError:p.easing [this.easing]不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  [23:50:35.971] TypeError在使用jQuery显示div元素时,出现此错误: :p.easing [this.easing]不是一个函数@ file:/// D:/html5%20puzzle/jquery.js:2 

相关函数是这样的:

$ p $ function showWithAnimation(){
console .log('动画调用');
$('#popup')。show();
$(#popup)。css({top:30%,left:30%})
.animate({top:(($(window) .height()/ 2) - ($('#popup')
.outerHeight()/ 2)) - 70},1000,'easeOutBounce')
.show();
}

该函数负责显示具有反弹动画的div,但是, div显示,但没有反弹效果。



编辑: jQuery和jQueryUI库从CDN这样(按顺序):

 < script src ='http:// ajax。 googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> 
< script src ='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js'>
< / script>


解决方案

您需要为扩展缓动选项包含jQueryUI。



我认为可能会有一个选项只在下载中包含缓动,或者至少只是基本库加缓动。


When trying to show a div element with jQuery, i got this error:

[23:50:35.971] TypeError: p.easing[this.easing] is not a function @ file:///D:/html5%20puzzle/jquery.js:2

The relevant function is this:

function showWithAnimation(){                  
  console.log('animation called');
  $('#popup').show();
  $("#popup").css({"top": "30%", "left": "30%"})
             .animate({top:(($(window).height()/2)-($('#popup')
             .outerHeight()/2))-70}, 1000, 'easeOutBounce')
             .show();
}

The function is responsible of showing the div with a bounce animation, however, the div is shown but without bounce effect.

EDIT:

I am including jQuery and jQueryUI libraries from a CDN like this (In order):

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js'>
</script>

解决方案

You need to include jQueryUI for the extended easing options.

I think there may be an option to only include the easing in the download, or at least just the base library plus easing.

这篇关于TypeError:p.easing [this.easing]不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆