title: JQuery data selector not updating with .data
body: <p>Basically if I have a div loaded onto a page with a <code>data-test</code> attribute and change the value of it with jquery's <code>.data('test')</code> I can no longer select the element with <code>$('div[data-test="newValue"]')</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>var howMany = $('.t[data-test="test"]').length;
  $('.result').html('start there are ' + howMany + ' divs with data "test"&lt;br /&gt;&lt;br /&gt;');
  setTimeout(function() {
    $('#one, #three').data('test', 'changed');
  }, 500);
  setTimeout(function() {
    var test = $('.t[data-test="test"]').length,
      changed = $('.t[data-test="changed"]').length;
    $('.result').append('there are ' + test + ' divs still with data "test"&lt;br /&gt;&lt;br /&gt;there are ' + changed + ' divs still with data "changed"&lt;br /&gt;&lt;br /&gt;');
  }, 1000);
  setTimeout(function() {
    $('.t').each(function() {
      $('.result').append('div #' + $(this).attr('id') + ' has the test data of: ' + $(this).data('test') + '&lt;br /&gt;&lt;br /&gt;');
    });
  }, 1500);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="t" id="one" data-test="test"&gt;1&lt;/div&gt;
  &lt;div class="t" id="two" data-test="test"&gt;2&lt;/div&gt;
  &lt;div class="t" id="three" data-test="test"&gt;3&lt;/div&gt;
  &lt;div class="t" id="four" data-test="test"&gt;4&lt;/div&gt;
  &lt;div class="result"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>