2013-03-03 64 views

回答

13

您可以檢查的$.validator存在:

if ($.validator) { 
    // $.validator is defined 
} 
0

插件增加了validationPlugin功能jQuery.fn,所以只需檢查是否存在與否;

if (typeof jQuery.fn.validationPlugin === "function") { 
    // It's loaded 
} else { 
    // It's not. 
} 
0

這適用於ValidationEngine 2.6.2:

if (typeof jQuery.fn.validationEngine === "function") { 
    // It's loaded 
} else { 
    // It's not. 
}