title: JQuery: replace DIV contents with html from an external file. Full example?
body: <p><strong>Question</strong></p>
  
  <p>What's the full code to enable jQuery on a page and then use it to replace the contents of a DIV with HTML text from an external file?</p>
  
  <p><strong>Background</strong></p>
  
  <p>I'm brand new to jQuery and I'm eager to work with it so I can learn it.  I have a site where I need to replace the contents of the same div (a footer) that exists on every page.  Fortunately, each of these pages already imports the same header file.  So I'm going to modify that header file with some jQuery magic! I'm having trouble finding <strong><em>full examples</em></strong> and I figured other's might have similar questions. Who better to ask than the SO gurus?</p>
  
  <p><strong>Example</strong></p>
  
  <p>Given a basic HTML file <code>Example.html</code>:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="selectedTarget"&gt;
              Existing content.
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And an external file <code>includes/contentSnippet.html</code> containing a snippet of html:</p>
  
  <pre><code>&lt;p&gt;
      Hello World!
  &lt;/p&gt;
  </code></pre>
  
  <p>What would the new <code>Example.html</code>file be that would link the proper jQuery libraries (from the ./js directory) and replace the div's contents via jQuery?</p>