title: How To Check If A Specific Element Exists On An External Page With JQuery
body: <p><strong>What I want to do</strong></p>
  
  <p>Using JQuery I want to check if a <code>div</code> with a specific <code>id</code> exists on a page on another website.</p>
  
  <p><strong>Example</strong></p>
  
  <p>From this website: <code>website1.com</code></p>
  
  <p>Check this webpage: <code>website2.com/page/</code></p>
  
  <p>For this element: <code>&lt;div id="this-element"&gt;</code></p>
  
  <p><strong>What I've tried</strong></p>
  
  <p>I've tried a bunch of different ways with .get and .ajax based on similar stackoverflow questions but am having trouble adapting the answers to work with what I need.</p>
  
  <p><strong>Code to play with</strong></p>
  
  <p>The below code uses a stackexchange page as an example with an element that does exist..</p>
  
  <pre><code>$.get('http://stackexchange.com/tour/', function(html) {
      if ($("#search")[0]){
          alert('search available'); 
      }
      else {
           alert("search is not available");
       }
  });
  </code></pre>
  
  <p><strong>Fiddle to play with..</strong></p>
  
  <p><a href="https://jsfiddle.net/xzf027b5/" rel="nofollow">https://jsfiddle.net/xzf027b5/</a></p>