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

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

To make the question clearer : I want the progress bar to have segments and they should be be green from 0% - 59%, yellow from 60% - 89%, and red from 90% - %100%.

3

1 Answer 1

3

You can do this with jquery.ui.multiprogressbar.js.

Inorder to set different color to progressbar create set of class as i used in demo and set it to barClass

Demo

    $('#plain').multiprogressbar({
       parts: [
        {value: 59,barClass: "green"},
       {value: 30,barClass: "yellow"},
       {value: 11,barClass: "red"}]
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.