Method to see jQuery files are loaded completely then execute the function related to it
<p>Method to see jQuery files are loaded completely then execute the function related to it</p>

<p>I want to show my div only when all the jQuery files related to that div is loaded.</p>

<p>document ready and window load function doesn't work.</p>

<p>How to write a conditional function where u can check whether all the jQuery is loaded then show the div.... i am calling all my jQuery files in an external js file, (basically i am trying to create a plugin for my client so that my external.js file will work from my server remotely).</p>

<p>my external.js file goes like this:</p>

<pre><code>  if (typeof jQuery === "undefined") {
  var script = document.createElement('script');
  script.src = 'js/jquery-1.7.1.min.js';
  script.type = 'text/javascript';
  document.getElementsByTagName('head')[0].appendChild(script);

  }

  if (typeof jQuery === "undefined") {
  var script = document.createElement('script');
  script.src = 'js/fancybox.js';
  script.type = 'text/javascript';
  document.getElementsByTagName('head')[0].appendChild(script);
 }

 document.ready = function() {
 $(document).ready(function(){

 $("#addimage").html("&lt;a id='fancybox' href='large"+clientID+".jpg'&gt;&lt;img border=0 src='thumb"+clientID+".jpg'/&gt;&lt;/a&gt;");

 }
 });
</code></pre>

<p>so i want this addimage div work only my jquery files is loaded completely</p>
