I\'m doing a sorting of a set of users, I have 4 groupings like so (2 shown):
-
Something like this would insert a div containing Total: #
after each group:
$(".groupWrapper").each(function() {
var total = 0;
$(this).find(".skill").each(function() {
total += parseInt($(this).text());
});
$(this).append($("<div></div>").text('Total: ' + total));
});
You can adjust the markup, etc...just adjust it based on whatever you want to do with the total.
讨论(0)