title: Use UL and LI as select or option box using jquery
body: <pre><code>&lt;ul class="stateid"&gt;
  
  &lt;li value="7" &gt;pa&lt;/li&gt;
  &lt;li value="8" &gt;ap&lt;/li&gt;
  &lt;li value="9" &gt;pat&lt;/li&gt;
  &lt;li value="19" &gt;part&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Wat I have tried so far is</p>
  
  <pre><code>$".stateid li").click(function(){
  
  alert($(this).val());
  });
  </code></pre>
  
  <p>Should only display the clicked li rest should be hidden</p>
  
  <p>I can fetch the value but not able to display just the selected state using jquery</p>