【发布时间】:2012-09-17 12:30:31
【问题描述】:
当试图用 jQuery 显示一个 div 元素时,我得到了这个错误:
[23:50:35.971] TypeError: p.easing[this.easing] is not a function @ file:///D:/html5%20puzzle/jquery.js:2
相关函数是这样的:
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();
}
该函数负责显示带有弹跳动画的 div,但是显示了 div 但没有弹跳效果。
编辑:
我正在包括来自 CDN 的 jQuery 和 jQueryUI 库,如下所示(按顺序):
<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>
【问题讨论】:
标签: javascript jquery html