[Solved]Jquery click() function not working
<p>I have 2 anchor tags like this</p>

<pre><code>&lt;a href="#" id="1"&gt;1&lt;/a&gt;
&lt;a href="#" id="2" style="display:none;"&gt;2&lt;/a&gt;
</code></pre>

<p>and Jquery functions like this</p>

<blockquote>
  <p>$(document).ready(function (){</p>
  
  <blockquote>
<pre><code> $('#1').click(function(){
      //code to show div 1
      //code to hide div 2
</code></pre>
  </blockquote>

<pre><code>   });

   $('#2').click(function(){
       //code to show div 2
       //code to hide div 1
   });
</code></pre>
  
  <p>});</p>
</blockquote>

<p>Problem is when I click on "2" anchor tag, second div tag displays then when I want to again display div 1 by clicking "1" anchor tag it doesn't work.
Its like after running 2nd function 1st function doesn't exist!</p>

<p>Updating Question with answer:
I changed the selectors to like ques-1, ques-2 and if there are two selectors with same name jquery calls only first selector, so better give selector different names even if one of them is gonna be active one at a time</p>
