Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>AFAIK, there's no <code>$.noConflict()</code> equivalent for jQuery UI. You can, however, use a local copy of jQuery UI and wrap the whole JS using a similar trick to what you use for aliasing the different libraries:</p> <pre><code>(function(jQuery) { // ... the jQuery UI lib code for jQuery 1.3.2 })(j$132); </code></pre> <p>This could be elegantly implemented using a server-side build script or a handler that serves the JS files but wraps the contents with the above code.</p> <p>Haven't tested this approach, so you may have to fiddle around with the function parameter (although I think it's safe to assume it uses <code>jQuery</code> to reference jQuery within the plugin code).</p> <p>The way you'd use this is declare both versions of jQuery:</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var j$132 = $.noConflict(true); &lt;/script&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var j$144 = $.noConflict(true); &lt;/script&gt; </code></pre> <p>... and then include your UI code, as I've specified above.</p> <p>And no, you can't do this while referencing the UI JS files from Google CDN.</p> <p><strong>EDIT:</strong> The second code block in the question is actually a better solution than this answer, since it doesn't require wrapping the original UI code in a self-executing function and passing the specific version. Both approaches do result in exactly the same state on the page.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload