title: How to add jQuery CDN fallback in XHTML?
body: <p>It is good practice to load a <a href="http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery" rel="nofollow">CDN-hosted jQuery</a> but to <a href="http://css-tricks.com/snippets/jquery/fallback-for-cdn-hosted-jquery/" rel="nofollow">fallback to a local file</a>. E.g. HTML5 Boilerplate does it like this:</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;window.jQuery || document.write('&lt;script src="js/vendor/jquery-1.8.0.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;
  </code></pre>
  
  <p>But how can the same be implemented in XHTML? As <code>document.write()</code> doesn't work in proper XHTML (sent as <code>application/xhtml+xml</code>), is there an alternative?</p>