title: Set selected option by text and reset to default option
body: <p>I have an html select element with a default option <code>Select an option</code> and I'm trying to change it when I click in some other element, for example: I have a button with value = <code>MyText select option</code>, if I click in this element I want to search if that text exists on my select options, I do this with <strong>contains</strong> jQuery method and seems to work, the problem is that I can have more than one elements with text and I don't know what is wrong with my code but seems to work only the first time. Here is an example of my problem:</p>
  
  <blockquote>
    <p>Two buttons, I click on the first button and works fine, then I click on the second and works too, but then I click on the first again doesnt work! </p>
  </blockquote>
  
  <p>Also I want to create a reset option, for this I'm using <code>.prop('selectedIndex',  0)</code> but doesnt work. </p>
  
  <p>Here is my example code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('.btn').click(function() {
    var value = $(this).val();
    $('#Sel option:contains(' + value + ')').attr("selected", true);
  
  });
  
  $('.btn2').click(function() {
    $('#Sel').prop('selectedIndex', 0);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  
  &lt;button value="Button 1" class="btn"&gt;Button 1&lt;/button&gt;
  &lt;button value="Button 2" class="btn"&gt;Button 2&lt;/button&gt;
  &lt;button class="btn2"&gt;Reset&lt;/button&gt;
  
  &lt;select name="" id="Sel"&gt;
    &lt;option value="0" selected disabled&gt;Select an option&lt;/option&gt;
    &lt;option value="1"&gt;Button 1&lt;/option&gt;
    &lt;option value="2"&gt;Button 2&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>PD: If there is an option to reset all my inputs (select, text, number, etc.) by clicking on input type="reset" that could be a solution for my reset problem, because I also tried by clicking on reset input with (window.MyForm.reset()) but my last selected option is not reseted.</p>