title: jQuery duplicate elements
body: <p>My code enables user to select up to 5 tags, shows the tags and counts the number.</p>
  
  <pre><code>$(document).ready(function(e) {
  
      var tagname = "";
      var count = 0;  
  
      $(".tagchoose").click(function(){ 
          count++;
          if(count &lt; 6) {
          $("#tagselectshow").html("Tags Selected: " + count + " tags selected");
          tagname = "&lt;span class='selectedtg'&gt;" + $(this).html() + "&lt;/span&gt; / ";
          $("#displaythetags").append(tagname);
          }
      });
  
      $("#deletetags").click(function(){ 
          count = 0;  
          tagname = "";
  
          $("#tagselectshow").html("Tags Selected: " + count + " tags selected");
          $("#displaythetags").html(tagname); 
      });
  
  });
  </code></pre>
  
  <p>Unfortunately at the moment the code does not restrict selection of the duplicate tags, I would like to add restriction for users to not be able to select the same tags. </p>