[jQuery] Problem with each()

[jQuery] Problem with each()


Hi,
I'm experiencing a problem with each():
function CalculateDuration() {
    $(".duration").each(function() {
        var dur = $(this).html();
        dur++;
        $(this).html(dur);
    });
}
This function should take the value of fields tagged with .duration
and augment them by one. Currently it's augmenting them with the
number of times it finds .duration (ie.: if I have 5 fields with class
duration, it will add 5 instead of 1 to each field).
Any suggestions on how to solve this would be more than welcome.