简体   繁体   English

jQuery错误:…缓和…不是函数

[英]jQuery error: …easing… is not a function

I'm getting the following error 我收到以下错误

TypeError: jQuery.easing[this.easing] is not a function
percent, this.options.duration * percent, 0, 1, this.options.duration

The code block from jQuery is jQuery的代码块是

run: function( percent ) {
    var eased,
    hooks = Tween.propHooks[ this.prop ];
    if ( this.options.duration ) {
         this.pos = eased = jQuery.easing[ this.easing ](
         percent, this.options.duration * percent, 0, 1, this.options.duration
        );
    } 
    ...

I attempted to include the jQuery UI (Customized download). 我试图包括jQuery UI(自定义下载)。 Customized with selecting of "Effects Core" only, Which included easing. 仅通过选择“效果核心”进行自定义,其中包括缓动。

 <script src="/jquery-1.10.2.js"></script>
 <script src="/jquery-ui-1.10.4.custom.min.js"></script>

I'm still getting the same ERROR! 我仍然收到相同的错误!

Could you try this CDN 你可以试试这个CDN吗

//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js

and see if it works? 看看是否可行?

Try using full version of jquery-ui or at least double check whether you selected easing option while downloading jquery-ui. 尝试使用完整版的jquery-ui或至少仔细检查在下载jquery-ui时是否选择了缓动选项。

try 尝试

<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.min.js"></script>

instead 代替

<script src="/jquery-ui-1.10.4.custom.min.js"></script>

if works then double check with downloaded jquery-ui. 如果可行,请仔细检查下载的jquery-ui。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM