How to change with jQuery a data attribute of a set of elements?
<p>say I have a set of elements $elements. Say they all have a data attr named "amount". First one has data-amount = 1, second 2 and so on. Whats the simplest way to increment in x that value for all of them. y solution is</p>

<pre><code>$elements.each(function(){
    $(this).data('amount',$(this).data('amount')+=x);
});
</code></pre>

<p>Is there a better solution, without using the each statement?
Thanks!</p>
