简体   繁体   中英

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. TypeError: v.easing[this.easing] is not a function Here is the script i using now

<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. I checked it in my system.

Removing line number 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 - created $ and added few properties to $
  • jQuery Ui - added more properties to $
  • jQuery - created $ and overridden the jQuery UI specific properties in $

According to the accepted answere of @Moazzam Khan . I had the same issue using jQuery 1.8.3 but I was pretty sure that I have included jQuery only once . After trying around I found out that I have to include jQuery-UI as well . 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.

Link to the solution: Solution

this is the list of all new easing and theirs names: http://api.jqueryui.com/easings/

I think the big problem is pointed out, you include two time 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.

There's a high probability that the inclusion of JQuery unset some things that Jquery-ui set when your include it. It may explain why your animation option is not found.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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