is there any way findout duplicate id name in the page using jquery
<p>my script is :</p>

<pre><code>$('document').ready(function () {  
    var position = 0; 
    var data = [{'id':'user1'},{'id':'user2'},{'id':'user3'},{'id':'user4'},{'id':'user5'}];  

    $('#add').click(function() {  
        var newdiv=$('&lt;div&gt;&lt;/div&gt;').attr('id', data[position].id).text(data[position].id);  
        $("#container").append(newdiv);  
        position++;position %= data.length;
    });  
});  
</code></pre>

<p>My html is:</p>

<pre><code>&lt;html&gt;
    &lt;body&gt;  
        &lt;button id="add"&gt;Add new div&lt;/button&gt;  
        &lt;div id="container"&gt;&lt;div id="user3"&gt;&lt;/div&gt;&lt;/div&gt;  
    &lt;/body&gt;  
&lt;/html&gt;   
</code></pre>

<p>when click a button i am appending new divs with some id name here before insert div i want to check all div id names if anything matches i don't want to append that div</p>

<p><a href="http://jsfiddle.net/sureshpattu/nfQWx/7/" rel="nofollow">my jsfiddle is here</a></p>
