removeClass and addClass optimization in a scoring system
Both the removeClass and addClass methods will accept a space-separated list of class names to add/remove, and both can be chained.

You can cache the selector so you don't have to repeatedly search the DOM.

And since you remove the same three classes in each branch of execution, you can move that outside of the if/else if/else:

var bkf = $(".bkf").removeClass("label-success label-warning label-important");
if (bodyPercent &gt;= successRatio) {
    bkf.addClass("label-success");
}
else if (bodyPercent &gt;= warningRatio) {
    bkf.addClass("label-warning");
}
else {
    bkf.addClass("label-important");
}