title: find select option by text
body: <p>Can anyone tell me why this works in older versions of jQuery (e.g. 1.4.2) but if you switch to a later version, e.g. (1.6 +) it stops working?</p>
  
  <p><a href="http://jsfiddle.net/nmvf6/1194/" rel="nofollow noreferrer">http://jsfiddle.net/nmvf6/1194/</a></p>
  
  <pre><code>$(function(){
      $('#my_button').click(function(){
          var unitName = "Unit2";
          $('.assUnit').find('option[text="'+unitName+'"]').remove();
      });
  
  });
  </code></pre>
  
  <p>​</p>
  
  <p>I have checked the error output in the console for the later versions, and an error seems to occur on the page load, before i've even got as far as it loading up my script and being able to click the button..</p>
  
  <p>When I change the version to 1.8.0 for example and Run the page, <a href="https://postimg.cc/hfKwV35V" rel="nofollow noreferrer">this error</a> comes up in my Opera scripts console:</p>
  
  <p><a href="https://i.stack.imgur.com/QWzJ1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QWzJ1.png" alt=""></a>
  </p>
  
  <p>Which seems to be in a "mootools" file..but I didn't select mootools, i selected jQuery 1.8.0</p>
  
  <p>:/</p>
  
  <p>Thanks.</p>