2

I am upgrading my JQuery V1.9.1 to V3.0 and I am using the "jquery migrate 3.0". I have this warning in my Console :

JQMIGRATE: easing function "jQuery.easing.swing" should use only first argument

When I searched the source of the warning's message, I found this code :

$('#cleanTable').find("tbody").fadeIn(200, function() {
    $('#cleanTable').toggle();
    $('#cleanTable').toggle();
  });

How can I rewrite this code to not get warning message?

I have found this link but I can't figure out How can I fix it?

I have the same warning for this code also :

$("#" + p_divId).hide(0, function() { 
  $("#" + p_divId + 'Mask').remove();
  $("#" + p_divId).children().remove();
  ..........
}); // end .hide

For more information, you can see the console trace for second code:

console.trace()
    migrateWarn @ jquery-migrate-3.0.0.js:64
    jQuery.Tween.run @ jquery-migrate-3.0.0.js:324
    tick @ jquery.js
    jQuery.fx.timer @ jquery.js
    Animation @ jquery.js
    doAnimation @ jquery.js
    dequeue @ jquery.js
    (anonymous function) @ jquery.js
    each @ jquery.js
    each @ jquery.js
    queue @ jquery.js
    animate @ jquery.js
    jQuery.fn.(anonymous function) @ jquery.js
    $.fn.extend.hide @ jquery.ui.js
    Hide0 @ (index):1663
    onclick @ (index):1647

3 Answers 3

2

Finally. I found the source of problem.

I was using jQuery Easing Plugin (version 1.3) when I got this error.

In this plugin we are using several function with multi parameters like : easeInQuad: function (x, t, b, c, d) {... And this was source of my problem.

I have deleted this plugin and I have no more this warning.

1

I believe that the issue here was that with jQuery 3 the extra parameters that the easing functions expected are now deprecated. Read https://jquery.com/upgrade-guide/3.0/#deprecated-additional-easing-function-parameters for details.

If you want to keep using the extra easing functions, visit https://github.com/gdsmith/jquery.easing and check out https://github.com/gdsmith/jquery.easing/blob/master/jquery.easing.js for the newer versions.

1

just use jquery easing 1.4.1 as that will resolve your issue https://github.com/gdsmith/jquery.easing

Not the answer you're looking for? Browse other questions tagged or ask your own question.