title: Get html content by id selector from external file using JQuery
body: <p>I want to know if there any possibility to get an element (HTML content) from an external HTML file using the ID selector of this element </p>
  
  <p>The external file (<code>template.html</code>):</p>
  
  <pre><code>&lt;div id="id1"&gt;Content 1 &lt;/div&gt;
  &lt;div id="id2"&gt;Content 2 &lt;/div&gt;
  </code></pre>
  
  <p>Is there any process like this : </p>
  
  <p>the current file (<code>index.html</code>)</p>
  
  <pre><code>&lt;script&gt;
  var url = "template.html";
  var externalHtmlContent = $ajax(url).document.getElementById("id").innerHTML;
  &lt;/script&gt;
  </code></pre>
  
  <p>so <code>externalHtmlContent</code> would contain "Content 1" value?</p>