title: Find duplicate item in unordered list
body: <p>I have two unordered lists. One unordered lists get populated dynamically and you double click it's items to add to the other unordered list. </p>
  
  <p>I'm trying to figure out how to detect if the item on the dynamically populated list isn't already in the other list. If it is. then it shouldn't get added again. Don't want to add duplicate items.</p>
  
  <p>The code that populates the ul: </p>
  
  <pre><code>.done(function(html) {
          var results = jQuery.parseJSON(html);
          $('#store_sel').children().remove();
  
              for (var i = 0; i &lt;= results.length; i++){
  
                  $("#store_selection").append("&lt;li class='" + results[i].name + " stores'" + "id= " + results[i].uuid + 
                  + "&gt;" + results[i].name + "&lt;/li&gt;");
  
          }      
      });
  </code></pre>
  
  <p>The event:</p>
  
  <pre><code>$('#store_selection').on('dblclick', 'li', function(e) {
      e.stopPropagation();
      e.preventDefault();
  
      if ($('#store_selected').find($(this))) {
          console.log('item already there');
      } else {
          $('#store_selected').append($(this).clone());
          //$(this).remove();
      }       
  });
  </code></pre>
  
  <p>EDIT: Why isn't this working? It basically goes to console.log even if the ul is empty.</p>