jQuery.easing[jQuery.easing.def] is not a function

后端 未结 9 879
春和景丽
春和景丽 2020-12-25 13:12

I am getting below error when I look in the console:

jQuery.easing[jQuery.easing.def] is not a function

I am trying to make a slider on Wor

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-25 13:45

    The problem is

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

    jQuery in this function could not be equal to the jQuery, where jQuery.extend( jQuery.easing, has been applied.

    1. replace jQuery with $
    2. wrap code with

      (function($, undefined) {
        ...
      }) (jQuery);
      

提交回复
热议问题