I\'m trying to debug a website, and I think that jQueryUI may not have loaded properly. How can I test if jQueryUI has loaded?
You can check if jQuery UI is loaded or not by many ways such as:
if (typeof jQuery.ui == 'undefined') {
// jQuery UI IS NOT loaded, do stuff here.
}
OR
if (typeof jQuery.ui != 'function') {
// jQuery UI IS NOT loaded, do stuff here.
}
OR
if (jQuery.ui) {
// This will throw an error in STRICT MODE if jQuery UI is not loaded, so don't use if using strict mode
alert("jquery UI is loaded");
} else {
alert("Not loaded");
}