2014-01-26 80 views

回答

0

我不熟悉WordPress的,但你有另一個錯誤:

Uncaught ReferenceError: jQuery is not defined

DOM中的展望表明,要包括jQuery框架之前jQuery的ui.min.js。此行:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js?ver=3.5"></script> 

應該在jquery.js包含之後。

這是您的js文件包含的訂單問題。因爲解析jquery-ui時沒有定義jQuery,因此未定義jQuery可拖動小部件,因此您對可拖動小部件的調用不起作用

0

您沒有包含jQuery核心,但只包含jQuery UI。如果您檢查控制檯,您將看到:

ReferenceError: Can't find variable: jQuery

所以包括jQuery的jQuery UI的之後,它會工作如:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 

jQuery UI的需要jQuery來工作正常:

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

相關問題