title: jQuery Finding Option Text Instead of Using Val
body: <p>I have a drop down selection box and using jQuery if statements i want to set a div element with some text, heres my code:</p>
  
  <pre><code>&lt;select id="drop"&gt;
      &lt;option value="Select"&gt;Choose an option...&lt;/option&gt; 
      &lt;option value="Blue" stock="0"&gt;Blue&lt;/option&gt;
      &lt;option value="Pink,15.00" stock="1"&gt;Pink&lt;/option&gt;
      &lt;option value="Red" stock="2"&gt;Red&lt;/option&gt;  
  &lt;/select&gt;
  
  
  
  $('#drop').change(function() {
  
     if ($(this).val() == 'Pink,15.00') { 
       $(".price-tag &gt; span").text("Pink 15.00");
     }
  
    if ($(this).val() == 'Red') { 
       $(".price-tag &gt; span").text("Red 5.00");
    }
  
    else {
       $(".price-tag &gt; span").text("5.00");
  
    }  
  });
  </code></pre>
  
  <p>The above code works fine when i select the Red option in the dropdown but it's not working when the Pink is selected, i believe jQuery has problems with the if statement .val containing a comma or fullstop "Pink,15.00".</p>
  
  <p>A way i could get around this is by checking the text in the option, not the value. Not sure how to do this though, something like option:selected.</p>
  
  <p>Help appreciated.</p>
  
  <p>Thanks</p>