<div class="progress">
<div class="progress-bar" style="width:10%"></div>
</div>
<div class="progress">
<div class="progress-bar" style="width:50%"></div>
</div>
<div class="progress">
<div class="progress-bar" style="width:80%"></div>
</div>
<script>
$(document).ready(function () {
var width = $(".progress-bar").width() / $('.progress-bar').parent().width() * 100;
console.log(width);
if (width >=0) {
$(".progress-bar").css("background-color", "#f44242");
}
if (width >= 15) {
$(".progress-bar").css("background-color", "#f48f41");
}
if (width >= 30) {
$(".progress-bar").css("background-color", "#f4cd41");
}
if (width >= 45) {
$(".progress-bar").css("background-color", "#a9f441");
}
if (width >= 60) {
$(".progress-bar").css("background-color", "#41f464");
}
if (width >= 75) {
$(".progress-bar").css("background-color", "#41acf4");
}
if (width >= 90) {
$(".progress-bar").css("background-color", "#414ff4");
}
});
</script>