title: External jQuery in Google Closure compiled JS?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1691861/jquery-compiled-with-google-closure-compiler">jQuery compiled with Google Closure Compiler</a>  </p>
  </blockquote>
  
  
  
  <p>My markup:</p>
  
  <pre><code>&lt;script src="http://somecdn.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
  &lt;script src="/js/mycode.closure_compiled.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>goog.provide("mycode");
  
  mycode.foo = function () {
      jQuery("#ajaxSpinner").show();
      jQuery.get("/ajax/foo", function () { /* ... */ });
  }
  </code></pre>
  
  <p>I want to compile my code with advanced optimizations using the Google Closure Compiler.</p>
  
  <p>How do I achieve the following?</p>
  
  <ol>
  <li>The compiler should not rename "jQuery" and "jQuery.get".</li>
  <li>The compiler should not throw Errors or Warnings (eg. "unknown type 'jQuery'").</li>
  </ol>