title: fill value and text in select box with jquery
body: <p>When i click on a element of a list , the element gets shown as a selected option in the select box</p>
  
  <p>i need to use native select box only , not to mention the elements in the list are present in the select dropdown</p>
  
  <p>but the issue is that , i dosent work when there is <code>value</code> attribute in the <code>&lt;option&gt;</code> tag . I want to to change both the text and value in the select box with the click of a button </p>
  
  <p>code : </p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
   &lt;button class="quick"&gt;QuickLink&lt;/button&gt;
   &lt;div class="list"&gt;
  &lt;ul class="apps"&gt;
      &lt;li&gt;CAPM&lt;/li&gt;
      &lt;li&gt;GCS&lt;/li&gt;
      &lt;li&gt;GRS&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;select class="xyz"&gt;
      &lt;option value=1&gt;CAPM&lt;/option&gt;
      &lt;option value=2&gt;GRS&lt;/option&gt;
      &lt;option value=3&gt;BDS&lt;/option&gt;
      &lt;option value=4&gt;CCAS&lt;/option&gt;
      &lt;option value=5&gt;WEDAT&lt;/option&gt;
      &lt;option value=6&gt;GCS&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>jquery : </p>
  
  <pre><code>$(function () {
    $('.apps li').click(function () {
      $('.xyz').val($(this).text());
    });
  });
  </code></pre>
  
  <p>fiddle link --> <a href="https://jsfiddle.net/2jqfpjLk/1/" rel="nofollow">https://jsfiddle.net/2jqfpjLk/1/</a> </p>
  
  <p>this is final working fiddle </p>
  
  <p><a href="https://jsfiddle.net/aoxrLyet/3/" rel="nofollow">https://jsfiddle.net/aoxrLyet/3/</a></p>