【问题标题】:jQuery Easing Undefined functionjQuery 缓动未定义函数
【发布时间】:2015-03-11 06:20:57
【问题描述】:

我最近将商店的更新迁移到了 shopify 服务器。这样做之后,即使它在开发服务器上工作,也会发生一些 jquery 问题。他们无法处理错误

Uncaught TypeError: undefined is not a function - Jquery Easing`

我正在努力调试它,因为它在我的其他服务器上工作。我将如何调试这个?

通过将鼠标悬停在图像上并在控制台中看到警告,可以在此处看到问题

http://thebrotique.co.uk/products/original-beard-oils

【问题讨论】:

    标签: jquery shopify easing uncaught-exception


    【解决方案1】:

    如果您深入了解控制台错误,您将能够开始调试。

    它发生在您的jQuery.easing 代码中:jquery.easing.1.3.js:46

    swing: function (x, t, b, c, d) {
        //alert(jQuery.easing.default);
        return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
    }
    //jQuery.easing.def is undefined
    

    它需要一些默认值。如果您将 jQuery.easing.def 定义为像 "easeOutQuad" 这样的有效值,它将开始工作。

    【讨论】:

    • 谢谢@peterdotjs。我将如何设置默认值?它令人困惑,因为它在其他网站上工作。
    • 实际刚刚开始工作。谢谢。我很困惑为什么当“主题”相同时它与其他服务器相比会有所不同
    • @Allreadyhome 它实际上看起来像是在发生其他事情,它看起来不像 jQuery.easing 代码已完全加载。如果它是jQuery.easing.def,则已经定义了。如果您采用缓动代码:raw.githubusercontent.com/gdsmith/jquery.easing/master/… 并将其加载到控制台中,一切都会按原样运行。
    猜你喜欢
    • 2014-01-03
    • 2017-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多