Testing loading jQueryTools

How can I check if the jQueryTools library has been loaded , how can we do in jQuery or jQueryUI?

Since I am using cdn to load the libraries, I need to make sure they are loaded correctly. With jQuery, I use this code (using jQuery () function):

if (jQuery) {
  // library loaded
}

      

So, I download the library using:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="jquery.min.js"><\/script>')</script>

      

Anything similar with jQueryTools?

0


source to share


1 answer


You can just check and see if one of the methods exists in this plugin, like in this example:



if(!jQuery().overlay) {
     // plug-in is not installed
}

      

+1


source







All Articles