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 核心jQuery.ui,但是如何检查draggable我正在使用的小部件 () 是否已加载,typeof($('something').draggable) == 'function'有更好的方法吗?
jQuery.ui
draggable
typeof($('something').draggable) == 'function'
你可以这样尝试:
if (typeof(jQuery.ui.draggable) != 'undefined'){ // UI draggable is loaded }