• flickr
  • linkedin
  • twitter
  • rss
Checking whether jQuery and jQuery ui have loaded

Checking whether jQuery and jQuery ui have loaded

Basic stuff for those who know what they’re doing with js – useful to me, when intranets keep stripping URLs and things!

<script type="text/javascript"><!--
window.onload = function() {
 if (window.jQuery) { 
 // jQuery is loaded 
 alert("jQuery loaded -Yeah!");
 } else {
 // jQuery is not loaded
 alert("jQuery Doesn't Work");
 }

if (jQuery.ui) {
 // UI loaded
alert("jQuery ui loaded too");
} else {
alert("jQuery ui not loaded");
}
}
// --></script>
Tech Reference:

Larry's a 30-something chap interested in travel, being a dork and changing the world via less boring training.

Leave a reply