i got this code
$('.pBwarn div').filter(function(index){
return parseInt(this.innerHTML) > 60;
}).addClass("pB_yellow");
$('.pBwarn div').filter(function(index){
return parseInt(this.innerHTML) > 80;
}).addClass("pB_red");
and want to know if it is useful? or maybe another way to realize this.
i want to change the green bar to yellow when percentage is larger than 60 (id="max60"
)
and change it to red if percentage is larger than 80 (id="max80"
)
just want to say that the script is running perfect. i only asking if there is potential for improvement :D
you can check the DEMO for a better understanding