Skip to content

Instantly share code, notes, and snippets.

@vndmtrx
Created August 5, 2012 14:53
Show Gist options
  • Save vndmtrx/3265226 to your computer and use it in GitHub Desktop.
Save vndmtrx/3265226 to your computer and use it in GitHub Desktop.
Cálculo do valor gasto em jogos na Steam usando jQuery
(function() {
var total = 0;
$jq("#store_transactions .block").each(function(i, v) {
var sum = 0;
$jq(v).find(".transactionRowPrice").each(function(ii, vv){
//console.log(i + ": " + $jq(vv).text());
custo = parseFloat($jq(vv).text().substr(1));
if(!isNaN(custo)) {
sum += custo;
}
});
console.log($jq(v).find(".block_header div").text() + ": " + sum);
total += sum;
});
console.log("Total: " + total);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment