Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
简单的 jQuery UI 函数,例如:
(function($) { $('ui').sortable(); })(jQuery);
导致错误,通常表明 jQuery UI 不存在。
Uncaught TypeError: Object [object Object] has no method 'sortable'
但是,Chrome 的开发者工具确认它已被加载。这是怎么回事?
答案就是停止使用 jQuery 速记。这:
变成:
jQuery(document).ready(function($){ $('ui').sortable(); });