Anton Artemev Anton Artemev - 1 year ago 109
CSS Question

Pie loader 2 progress colors, css, html, javascript

I almost finished timeout timer using ReactJS. It should look like a pie loader and I need at the last 30% of progress to change color from green to yellow.

The result of how it should look here:

As a template for timer I took this one.

<div class="pie" data-percent="22">
<div class="left">
<div class="right">

Answer Source

One simple possibility would be to add and remove a class based on the progress:


$(".pie").each(function() {
    var percent = $(this).data("percent"),
        $left = $(this).find(".left span"),
        $right = $(this).find(".right span"),

    if(percent >= 70) {
    } else {


.pie-almostComplete {
    background-color: rgb(255, 207, 51);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download