【问题标题】:jQuery error: ...easing... is not a functionjQuery 错误:...easing... 不是函数
【发布时间】:2014-08-02 21:36:19
【问题描述】:

我收到以下错误

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

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
        );
    } 
    ...

我尝试包含 jQuery UI(自定义下载)。 仅通过选择“Effects Core”进行自定义,其中包括缓动。

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

我仍然遇到同样的错误!

【问题讨论】:

标签: javascript jquery jquery-ui jquery-plugins jquery-animate


【解决方案1】:

你可以试试这个 CDN

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

看看它是否有效?

【讨论】:

    【解决方案2】:

    尝试使用完整版的 jquery-ui 或至少仔细检查您是否在下载 jquery-ui 时选择了缓动选项。

    试试

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

    改为

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

    如果有效,则使用下载的 jquery-ui 仔细检查。

    【讨论】:

      猜你喜欢
      • 2011-08-31
      • 1970-01-01
      • 2014-03-04
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 2011-01-07
      相关资源
      最近更新 更多