title: Get data-attribute jquery vs javascript
body: <p>I have a custom data-attribute set by default:</p>
  
  <p><code>data-equipment="0"</code></p>
  
  <p>If i change it with jquery using <strong>.data()</strong> </p>
  
  <p><code>$(this).data("equipment", 10)</code></p>
  
  <p>and then use the <strong>getAttribute()</strong></p>
  
  <p><code>this.getAttribute("data-equipment")</code></p>
  
  <p>i get the old value (0) and not the new one (10). But if i use</p>
  
  <p><code>$(this).data("equipment")</code> i get the new value (10).</p>
  
  <p>Is this supposed to work like this or am i missing something? </p>
  
  <p>Thanks!</p>