“TypeError: jQuery.easing[this.easing] is not a function” in jQuery 1.9.1

后端 未结 6 832
独厮守ぢ
独厮守ぢ 2021-01-17 23:45

For the first time in too many months (blush), I upgraded my jQuery stuff. I\'m now on:

  • jquery-1.9.1.js
  • jquery-ui-1.10.2.custom.js (used ThemeRoller,
6条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-17 23:52

    This has absolutely nothing to do with versions.

    I had this code and got the same error:

    $("#consoleBtn").click(function(){
        $("#consolePanel").toggle("display", {  from : { display: "block" }, to : { display: "none" } });
    });
    

    The problem was the arguments I passed to the toggle function. So I changed to:

    $("#consoleBtn").click(function(){
        $("#consolePanel").toggle();
    });
    

    So be mindful of the arguments passed to your function when calling jQuery-api. Hope this helps.

提交回复
热议问题