title: Correct use of JQuery in compatibility mode
body: <p>I a javascript class i wrote i use a specific dynamically loaded version of JQuery (version 3.2.1).
  I use that dynamiclly loaded version in compatibilty mode.</p>
  <p>I am not suere if selector &quot;generated&quot; in compatibilty mode and passed as argument to a function, will also use the compatibility mode (my own version instead of the original one).</p>
  <p>Here the code :</p>
  <pre><code>function toggleFunction ( jQuerySelectorItem )
  {
      //hide all
      $jq_321(&quot;.class&quot;).hide();
      
      var checkBoxes = $jq_321(&quot;.class[rel-data='&quot; + jQuerySelectorItem.attr(&quot;rel-data&quot;) + &quot;'] input&quot;); // &lt;&lt;&lt;&lt;&lt; is this 'jQuerySelectorItem' still use jQuery 3.2.1 if generated by '$jq_321' selector ?
  
      if (jQuerySelectorItem.is(&quot;:checked&quot;)) 
      {
          checkBoxes.toArray().forEach ( item =&gt; this.__changeDependantCheckBoxStatus(item, true));
      } 
      else 
      {
          checkBoxes.toArray().forEach ( item =&gt; this.__changeDependantCheckBoxStatus(item, false));
      }
      
      $jq_321(&quot;.class[rel-data='&quot; + jQuerySelectorItem.attr(&quot;rel-data&quot;) + &quot;']&quot;).show();
  }
  </code></pre>
  <p>Here is how i dynamically load the correct version of JQuery in compatibilty mode before using it :</p>
  <pre><code>window.onload = (event) =&gt; {
      var jqScriptTag = document.createElement(&quot;script&quot;);
      jqScriptTag.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js';
  
      jqScriptTag.onload = function() {
          console.log('Temporary jQuery version : ' + jQuery.fn.jquery);
          $jq_321 = jQuery.noConflict(true);
  
          console.log('Restored original jQuery version : ' + jQuery.fn.jquery);
          //other code that will indeed call toggleFunction when needed
      };
  
      document.head.appendChild(jqScriptTag);
  };
  </code></pre>
  <p>Here the console log :</p>
  <blockquote>
  <p>Temporary jQuery version : 3.2.1</p>
  <p>Restored original jQuery version : 1.4.2</p>
  </blockquote>