簡體   English   中英

jQuery錯誤:…緩和…不是函數

[英]jQuery error: …easing… is not a function

我收到以下錯誤

TypeError: jQuery.easing[this.easing] is not a function
percent, this.options.duration * percent, 0, 1, this.options.duration

jQuery的代碼塊是

run: function( percent ) {
    var eased,
    hooks = Tween.propHooks[ this.prop ];
    if ( this.options.duration ) {
         this.pos = eased = jQuery.easing[ this.easing ](
         percent, this.options.duration * percent, 0, 1, this.options.duration
        );
    } 
    ...

我試圖包括jQuery UI(自定義下載)。 僅通過選擇“效果核心”進行自定義,其中包括緩動。

 <script src="/jquery-1.10.2.js"></script>
 <script src="/jquery-ui-1.10.4.custom.min.js"></script>

我仍然收到相同的錯誤!

你可以試試這個CDN嗎

//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js

看看是否可行?

嘗試使用完整版的jquery-ui或至少仔細檢查在下載jquery-ui時是否選擇了緩動選項。

嘗試

<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.min.js"></script>

代替

<script src="/jquery-ui-1.10.4.custom.min.js"></script>

如果可行,請仔細檢查下載的jquery-ui。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM