title: JQuery1.8.3 to JQuery 1.12.4 migrate issue
body: <p>I have the following code which works fine with jQuery 1.8.3 but with jQuery 1.12.4, I got a null value:</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-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;find demo&lt;/title&gt;
      &lt;script src="https://code.jquery.com/jquery-1.8.3.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;button type="button" onClick="runMe()"&gt;click me&lt;/button&gt;
  
  &lt;div id="transactionTypeDiv" class="row-fluid"&gt;
      &lt;div class="span4"&gt;
        &lt;label for="transactionType"&gt;Transaction Type&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="span8"&gt;
        &lt;span id="transactionTypeSpan"&gt; 
        &lt;select id="transactionType" name="transactionType"&gt;
          &lt;option selected="" value="blank"&gt;Select One of the Following:&lt;/option&gt;
          &lt;option value="Authorization"&gt;Authorization&lt;/option&gt;
          &lt;option value="AVS"&gt;AVS&lt;/option&gt;
          &lt;option value="CaptGivenAuth"&gt;Given Authorization&lt;/option&gt;
        &lt;/select&gt;
        &lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;p id="output"&gt;&lt;/p&gt;
  &lt;script&gt;  
  
  function runMe() {  
  
    $('#transactionType').val($.trim($("#transactionTypeSpan").text()));
    $('#output').text($('#transactionType').val());
    }
  &lt;/script&gt;
   
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>If I change  to jquery-1.12.4.js, then when you click the "click me" button, it will return null.</p>
  
  <p>I tried separate the code:</p>
  
  <pre><code>$('#transactionType').val($.trim($("#transactionTypeSpan").text()));
  </code></pre>
  
  <p>into two lines but <code>$('#transacitonType').val()</code> is still giving me null with jquery-1.12.4 but blank with jquery-1.8.3.js</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-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;find demo&lt;/title&gt;
      &lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;button type="button" onClick="runMe()"&gt;click me&lt;/button&gt;
  
  &lt;div id="transactionTypeDiv" class="row-fluid"&gt;
      &lt;div class="span4"&gt;
        &lt;label for="transactionType"&gt;Transaction Type&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="span8"&gt;
        &lt;span id="transactionTypeSpan"&gt; 
        &lt;select id="transactionType" name="transactionType"&gt;
          &lt;option selected="" value="blank"&gt;Select One of the Following:&lt;/option&gt;
          &lt;option value="Authorization"&gt;Authorization&lt;/option&gt;
          &lt;option value="AVS"&gt;AVS&lt;/option&gt;
          &lt;option value="CaptGivenAuth"&gt;Given Authorization&lt;/option&gt;
        &lt;/select&gt;
        &lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;p id="output"&gt;&lt;/p&gt;
  &lt;script&gt;  
  
  function runMe() {  
  
    $('#transactionType').val($.trim($("#transactionTypeSpan").text()));
    $('#output').text($('#transactionType').val());
    }
  &lt;/script&gt;
   
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>