Created
August 5, 2012 14:53
-
-
Save vndmtrx/3265226 to your computer and use it in GitHub Desktop.
Cálculo do valor gasto em jogos na Steam usando jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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