how to use a value (which is get by .text() when a li is clicked) as a selector to hide some div
<p>i have a ul li list like</p>

<pre><code>&lt;ul class="dropdown-menu" id="dropdown"&gt;
   &lt;li&gt;&lt;a id='l1' href='javascript:void(0);'&gt;batch1&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a id='l2' href='javascript:void(0);'&gt;batch2&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a id='l3' href='javascript:void(0);'&gt;batch3&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a id='l4' href='javascript:void(0);'&gt;batch4&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a id='l5' href='javascript:void(0);'&gt;batch5&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a id='l6' href='javascript:void(0);'&gt;batch6&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>now, i can get the text value of every li, the problem is, i cannot use the text value as
selector.what i want to do is: i have some div(id are "batch1, batch2...batch6"),which i want to hide if a li is clicked(except clicked li). code are=</p>

<p>html:</p>

<pre><code>&lt;div id="batch1"&gt;&lt;/div&gt; 
&lt;div id="batch2"&gt;&lt;/div&gt; ......
</code></pre>

<p>jquery:</p>

<pre><code>$(document).ready(function(e) {
    $('body').click(function(event) {

    if($(event.target).is('#l1')) {
       var id = "'#"+$('#l2').text()+"'";
       $(id).hide();
    }
});
});
</code></pre>

<p>what should i do. i am trying about 24 hours but still in dark. and thanks in advance</p>
