If I have this html, how would I change the color based on the width?
<div id="progress_bar" class="meter-bg">
<div class="meter" style="width: 67%;">
</div>
</div>
For example, if the width is between 0 and 33%, green. If it’s 33%-66% orange. If it’s 66%-100% red.
Here would be my solution: http://jsfiddle.net/jKWFz/
Edit: If the content is loaded in AJAX, all you need to do is wrap the above code in a function, and call it when the content been loaded.
For example:
Updated JSFiddle: http://jsfiddle.net/jKWFz/2/