jQuery UI: How to change the color of a ProgressBar?

Posted by IronGoofy on Stack Overflow See other posts from Stack Overflow or by IronGoofy
Published on 2009-09-25T10:33:30Z Indexed on 2010/03/13 17:15 UTC
Read the original article Hit count: 207

Filed under:
|
|

I've set up a simple jQueryUI progressbar:

<script type="text/javascript">
            $(function() {
                    $("#progressbar").progressbar({
                            value: 35
                    });
            });
            </script>
<div id="progressbar">  </div>

Now, I'd like to color the of the bar based on it's value (e.g. <10 red, <50 yellow, >50 green). How do I do this?

Note: There are similar questions, but the answers were not clear enough to help me get things done. Hopefully, someone can point out an easier way or provide more detailed instructions. Thanks.

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about progressbar