Checking data of all same class elements
<p>I need the code to check the data-name value of all instances of .account-select.  Right now it just checks the first .account-select element and not any subsequent ones.  </p>

<p>The function right now is on click of an element such as John Smith, it checks the data-name of the .account-select lis.  If the data-names are the same, it does not create a new li with the John Smith data.
If no data-names are equal to John Smith, then it adds an li with John Smith. </p>

<p>This is the JS-Fiddle I made for it so you can see what I am referring to: <a href="http://jsfiddle.net/rsxavior/vDCNy/22/" rel="nofollow">http://jsfiddle.net/rsxavior/vDCNy/22/</a>
Any help would be greatly appreciated. </p>

<p>This is the Jquery Code I am using right now.</p>

<pre><code>$('.account').click(function () {
   var acc = $(this).data("name");
    var sel = $('.account-select').data("name");           
    if (acc === sel) {
    }
    else {
         $('.account-hidden-li').append('&lt;li class="account-select" data-name="'+ $(this).data("name") +'"&gt;' + $(this).data("name") + '&lt;a class="close bcn-close" data-dismiss="alert" href="#"&gt;&amp;times;&lt;/a&gt;&lt;/li&gt;');
    }
});
</code></pre>

<p>And the HTML:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a class="account" data-name="All" href="#"&gt;All&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a class="account" data-name="John Smith" href="#"&gt;John Smith&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ul class="account-hidden-li"&gt;
    &lt;ul&gt;
</code></pre>
