Skip to content
Advertisement

Testing if jQueryUI has loaded

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?

Advertisement

Answer

if (jQuery.ui) {
  // UI loaded
}

OR

if (typeof jQuery.ui != 'undefined') {
  // UI loaded
}

Should do the trick

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement