Note that there are some explanatory texts on larger screens.

plurals
  1. PO2 versions of jQuery -> 2 documents. why?
    primarykey
    data
    text
    <p>I have a small page:</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script type="text/javascript" src="jquery-1.4.2.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="temp.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;foo&lt;/p&gt; &lt;p&gt;bar&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and I'm trying to load two different versions of jQuery:</p> <pre><code>// temp.js jQueryScriptOutputted = false; initJQuery = function() { //if the jQuery object isn't available if (typeof(myjQuery) == 'undefined') { if (!jQueryScriptOutputted) { //only output the script once.. jQueryScriptOutputted = true; //output the script (load it from google api) document.write("&lt;script type=\"text/javascript\" src=\"jquery-1.6.4.js\"&gt;&lt;/script&gt;"); document.write("&lt;script type=\"text/javascript\"&gt;var myjQuery = $.noConflict(true);&lt;/script&gt;"); } setTimeout("initJQuery()", 50); } else { myjQuery(function() { // Check jQuery versions console.log('myjQuery version = ' + myjQuery().jquery); console.log('$ version = ' + $().jquery); console.log('jQuery version = ' + jQuery().jquery); // Get the data of the actual poll document.write("Where is foo and bar?!?"); }); } } initJQuery(); </code></pre> <p>but it seems that this loads two different documents. I mean, when you open the page, the paragraphs get lost. How come?!?</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.
 

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