title: Conflict with jQuery.noConflict()
body: <p>For the life of me, I can't figure out how to get jQuery.noConflict() to work to resolve the problems caused by needing two different versions of jQuery on my site.  I have read numerous articles online and read other people's questions and answers on this site, but nothing seems to work and I can't figure out why, though my situation is a little different from the others that I've read.  </p>
  
  <p>Let me try to explain my situation and what I've tried.  I have several different plugins that require jQuery 1.4.2 and can't work with anything higher.  I have a single plugin that uses a newer version, jQuery 1.7.1.  The older plugins and the one newer plugin need a $(document).ready( function() to get initialized.  I have a feeling this is where my trouble lies.  It seems that I need to have 2 instances of $(document).ready( function(), each using a different jQuery library, but I'm not exactly sure how to do this. (This is the part that I said makes my situation a little different from other peoples that I've read about.)</p>
  
  <p>Here's the basic setup:</p>
  
  <pre><code>    &lt;script type="text/javascript" src="js/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin1.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin2.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin3.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript" src="js/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin4.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Now I need a $(document).ready(function() to initialize and start the plugins.  Since plugin1, plugin2, and plugin3 use jQuery 1.4.2, and plugin4 needs jQuery 1.7.1, I figured that I needed to use two different instances of $(document).ready(function().  First I tried this approach, which is how some websites describe as the proper way to use noConflict():</p>
  
  <pre><code>    &lt;script type="text/javascript" src="js/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;var jQuery1 = jQuery.noConflict( true );&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin1.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin2.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin3.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript" src="js/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;var jQuery2 = jQuery.noConflict( true );&lt;/script&gt;
      &lt;script type="text/javascript" src="js/plugin4.js"&gt;&lt;/script&gt;
  
      jQuery1(document).ready( function(){
        // initialize plugins 1, 2, and 3 here using jQuery1 instead of $
      });
  
      jQuery2(document).ready( function(){
        // initialize plugin 4 here using jQuery2 instead of $
      });
  </code></pre>
  
  <p>This approach alone didn't work.  So then I went into plugin4.js and changed all instances of $ to jQuery2.  That also didn't work. I've tried noConflict without the boolean true.  Didn't work.  Can anyone tell me what I'm doing wrong?  Do I need to go into plugin1.js, plugin2.js, and plugin3.js and change all instances of $ to jQuery1?  I'm not 100% on how noConflict() works so I'm not sure if this is necessary.  However, I hope I don't have to do this because plugin3.js has been obfuscated so I wouldn't be able to anyways.  If anyone can help, it would be greatly appreciated.   </p>