简体   繁体   English

TypeError:v.easing [this.easing]不是函数

[英]TypeError: v.easing[this.easing] is not a function

Hi all I make the easing effect for the notification bar in my wordpress Site but whenever i click the button i get the error as TypeError. 大家好,我在我的wordpress网站中为通知栏制作了缓动效果,但是每当我单击按钮时,我都会得到TypeType错误。 TypeError: v.easing[this.easing] is not a function Here is the script i using now TypeError:v.easing [this.easing]不是函数这是我现在使用的脚本

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

In Previously i called the script as like this 在以前,我这样称呼脚本

 <script src="<?php echo site_url(); ?>/wp-includes/js/jquery/jquery.js"></script>
 <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

Here is the Screenshot What i face exactly. 这是我确切面对的截图。 在此处输入图片说明

Any suggestion would be great. 任何建议都很好。 I Provide the live link 我提供实时链接

You have two copy of jQuery file in your webpage, remove one inclusion, it would start working. 您的网页中有jQuery文件的两个副本,删除一个包含的副本,它将开始工作。 I checked it in my system. 我在系统中检查了它。

Removing line number 200 - 删除行号200-

script type='text/javascript' src='http://techstumbling.com/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>

would work. 会工作。

Explained - 解释 -

You have included jQuery file in the following order - 您已按以下顺序包含jQuery文件-

  • jQuery - created $ and added few properties to $ jQuery-创建了$,并向$添加了一些属性
  • jQuery Ui - added more properties to $ jQuery Ui-向$添加了更多属性
  • jQuery - created $ and overridden the jQuery UI specific properties in $ jQuery-创建$并覆盖$中的jQuery UI特定属性

According to the accepted answere of @Moazzam Khan . 根据@Moazzam Khan的接受回答 I had the same issue using jQuery 1.8.3 but I was pretty sure that I have included jQuery only once . 我在使用jQuery 1.8.3时遇到了同样的问题,但是我很确定自己只包含了一次jQuery After trying around I found out that I have to include jQuery-UI as well . 经过尝试后,我发现我还必须包括jQuery-UI Than the issue disappeard. 比问题消失了。 Hope this helps people who experienced the same probpem like I did. 希望这对像我一样经历过相同问题的人们有所帮助。

the problem is because the easing effect named was changes after version 1.9 of jQuery. 问题是因为命名的缓动效果在jQuery 1.9版本之后发生了变化。

Link to the solution: Solution 链接到解决方案: 解决方案

this is the list of all new easing and theirs names: http://api.jqueryui.com/easings/ 这是所有新缓动及其名称的列表: http : //api.jqueryui.com/easings/

I think the big problem is pointed out, you include two time JQuery. 我认为指出了一个大问题,您包括两次JQuery。 But it's not a big big problem itself. 但这本身并不是一个大问题。

The bigest problem is that you have an include of JQuery AFTER including JQuery-UI. 最大的问题是您拥有包含JQuery-UI的JQuery AFTER

There's a high probability that the inclusion of JQuery unset some things that Jquery-ui set when your include it. 当包含JQuery时,包含JQuery的设置很有可能会取消Jquery-ui设置的某些设置。 It may explain why your animation option is not found. 它可以解释为什么找不到动画选项。

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

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