1
我正在动态加载jqm,我需要知道它是否已在某些情况下加载。 有没有办法知道jqm是否被加载?如何识别jquery mobile是否已经加载?
我正在动态加载jqm,我需要知道它是否已在某些情况下加载。 有没有办法知道jqm是否被加载?如何识别jquery mobile是否已经加载?
您可以检查使用此代码片段
if($.mobile !== undefined){
console.log('jQuery mobile loaded');
}else{
//make your fall back;
}
if (jQuery.mobile) {
console.log("jQuery Mobile is loaded");
}