【JQuery】sortable.js Uncaught TypeError $(...).sortable is not a function
来源:互联网 发布:ps4移动网络nat3转nat2 编辑:程序博客网 时间:2024/05/17 02:28
在修改图片顺序时,引入了sortable.js。由于在调整顺序的同时,要把对应的图片顺序保存到数据库,所以需要在调整完之后触发相应的顺序,所以用到了sortable里的stop事件。
js代码如下:
$("####").sortable({ stop: function (event, ui){ //.................. } });
但是使用之后,浏览器报错:
Uncaught TypeError: $(...).sortable is not a function
解决方法:sortable.js需要在引用sortable.js之前先引用jquery.ui.js
引入之后顺利解决了问题。
<script src="~/Scripts/jqueryUI/jquery-ui.min.js"></script> <script src="~/Scripts/plugins/sortable/Sortable.min.js"></script>
0 0
- 【JQuery】sortable.js Uncaught TypeError $(...).sortable is not a function
- jquery.js里面报错Uncaught TypeError: a.indexOf is not a function
- Uncaught TypeError: jQuery.handleError is not a function
- jQuery 异常 Uncaught TypeError: url.indexOf is not a function
- Sea.js出现Uncaught TypeError: object is not a function
- js异常Uncaught TypeError: $(...).datagrid is not a function
- jquery-ui.min.js:5 Uncaught TypeError: b.nodeName.toLowerCase is not a function
- jquery.min.js:2 Uncaught TypeError: $(...).DataTable is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: string is not a function
- Uncaught TypeError: object is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: object is not a function
- Uncaught TypeError: boolean is not a function
- Uncaught TypeError: $(...).appendChild is not a function
- Uncaught TypeError: sum is not a function
- Uncaught TypeError: search is not a function
- 关于MIME Type
- iOS开发路线简述
- 安卓 简单的ViewPager 滑屏
- 导出excel时因字段过长导致的hresult:0x800a03ec错误解决办法
- 前端基础3
- 【JQuery】sortable.js Uncaught TypeError $(...).sortable is not a function
- 利用物化视图迁移大表
- JavaScirpt学习经历
- 断点调试——在线程和在代码中切换
- 最新版SDWebImage的使用
- 关于自定义相机预览问题的解决
- CentOS 6桥接网卡配置
- mysql
- 关于drools使用时的wrong class format报错问题