1

我正在尝试对 ul 项目列表进行排序并jquery-ui-1.7.2.custom.min.js用于相同的项目,但出现以下错误:

$(...).sortable is not a function.

知道我做错了什么吗?

提前致谢。

4

2 回答 2

0

Without an HTML/js snippet or a jsfiddle you have some points to check.

Check to have included the jQuery core library.

Check to have included jquery-ui-1.7.2.custom.min.js in your file after jQuery.

You are using a custom distro so check to have included the right dependencies (these ar for jQuery UI 1.9.1) to let sortable works:

  • UI Core
  • Widget factory
  • Mouse interation

Run your script inside $(document).ready function to ensure that the DOM is fully loaded before to acess it.

Specify a function to execute when the DOM is fully loaded

于 2013-06-07T11:51:00.563 回答
0

检查您的 jquery 文件的权限和包含。有时权限浏览器无法读取文件并给出错误。

于 2013-06-08T07:53:28.717 回答