on selecting on li previous should not be selected?
<pre><code>&lt;li id="left-nav-li_1" value="foo"&gt;
         &lt;a href="javascript:void(0)"&gt;&lt;p  class="text-email" id="p_1"&gt;foo&lt;/p&gt;
         &lt;input type="text" id="edit-emailer_foo" class="add-email hide" value="foo" /&gt;&lt;/a&gt;

&lt;/li&gt;
</code></pre>

<p>There is number of similar li where id changes by appending number after _. On click p tag shold be hide and input tag should be show class. When I click other li the previous selected 
input should have hide class and p tag should have show class.</p>

<pre><code>$('input[id^="edit-emailer_"]').each(function() { $(this).addClass('hide'); });
$('input[id^="edit-emailer_"]').each(function() { $(this).removeClass('show'); });
</code></pre>

<p>I am trying but it is not working.</p>
