using multiple id in jquery
<p>I made little jquery script for checking if input box value bigger than 5 .but I have 2  tag with an id and only one of them works.</p>

<pre><code>&lt;div id="register"&gt;
    &lt;form id="register"&gt;
&lt;input id="first" type="text" /&gt; &lt;a id="first" &gt;&lt;/a&gt; &lt;br /&gt;
    &lt;input id="second" type="text" /&gt; &lt;a id="second" &gt;&lt;/a&gt;

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

<p></p>

<pre><code>$('input').keyup(function(){
if($(this).val().length&lt;5)
   {
  $('a.first').text("Please fill"); 
   }
if($(this).val().length&lt;5){
     $('a.second').text("Please fill"); 
   }
});
</code></pre>

<p>But it shows only first <code>&lt;a id="first"&gt;&lt;/a&gt;</code> tag. Second tag not visible</p>
