How to append input value with ,(comma) when li click?
<p>i have HTML like below,</p>

<pre><code>&lt;ul class="holder" style="width: 512px;"&gt;
    &lt;li id="pt_5uZqW99dmlgmiuCTJiPHDC9T9o2sfz0I"
    rel="test1@gmail.com"
    class="bit-box"&gt;test1@gmail.com&lt;a href="#" class="closebutton"&gt;&lt;/a&gt;
    &lt;/li&gt;
    &lt;li id="pt_9O0pMJDhtNbRgU1vNM8He8Vh9zpJ1tcE" 
    rel="test2@gmail.com"
    class="bit-box"&gt;test2@gmail.com&lt;a href="#" 
    class="closebutton"&gt;&lt;/a&gt;
    &lt;/li&gt;
    &lt;li id="pt_U8JH5E9y5w4atm4CadEPvuu3wdh3WcBx" 
    rel="test3@gmail.com" 
    class="bit-box"&gt;test3@gmail.com&lt;a href="#"
    class="closebutton"&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li id="Project_update_user_id_annoninput" 
     class="bit-input"&gt;
     &lt;input type="text" autocomplete="off" size="0" class="maininput"&gt;&lt;/li&gt;
    &lt;/ul&gt;


&lt;input id="removeuser" value="" /&gt;
</code></pre>

<p>I need to store the values of li's in hidden input box when I click that li's.
If I click first two li's i need to store the values like,</p>

<pre><code>&lt;input id="removeuser" value="test1@gmail.com,test2@gmail.com" /&gt;
</code></pre>

<p>That is i need to append input values every time when i click li's.</p>

<p>i used below one,</p>

<pre><code>jQuery(document).ready(function(){                

       jQuery("a.closebutton").click(function(){

          jQuery("input#removeuser").val(jQuery.map(jQuery(this).parent().attr('rel')).join(","));

        });

    });
</code></pre>

<p>But it does not works.how can i do that?</p>
