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.
我正在动态加载 jqm,我需要知道它在某些情况下是否已经加载。有没有办法知道 jqm 是否已加载?
if (jQuery.mobile) { console.log("jQuery Mobile is loaded"); }
您可以使用此代码片段进行检查
if($.mobile !== undefined){ console.log('jQuery mobile loaded'); }else{ //make your fall back; }