title: jQuery select option selected when click on option
body: <p>Here is my code Snippets<br/><br/>
  HTML Code</p>
  
  <pre><code>&lt;select name="options"&gt;
     &lt;option value="0" selected="selected"&gt;all&lt;/option&gt;
     &lt;option value="1"&gt;1&lt;/option&gt;
     &lt;option value="2"&gt;2&lt;/option&gt;
     &lt;option value="3"&gt;3&lt;/option&gt;
     &lt;option value="4"&gt;4&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>jQuery Code <br/></p>
  
  <pre><code>$('select[name=options]').change(function(e) { 
      // $(this).attr('selected',true); CHANGED AS BELOW
      $(this).find(':selected').attr('selected',true);
  });
  </code></pre>
  
  <p>This jQuery code adds attribute to <code>&lt;select&gt;</code> I want it on which option I click it automatically set selected.</p>