Reputation: 6883
I"m using JQuery Progress-Bar and want to change his white\grey color schema.
Currenly- empty space is colored with White and filled space colored with Grey.
My needed colors schema: Black for empty spaces and Red for Filled spaces.
This is how my html looks like:
<div id="progress" style="margin-top:50px;">
<div id="progressbar"><div class="progress-label">Loading...</div></div>
</div>
This is how I'm controlling my progress back behaviour:
var progressbar = $("#progressbar"), progressLabel = $(".progress-label");
progressbar.progressbar({
value: false,
change: function () {
progressLabel.text(progressbar.progressbar("value") + "%");
},
complete: function () {
progressLabel.text("Complete!");
}
});
How can I changed this colors?
Upvotes: 1
Views: 2077
Reputation: 189
There are two classes that you want to style:
background parameter determines color in both cases.
CSS schema for your needs would be something like this:
.ui-progressbar {
background: black;
//... other values ...
}
.ui-progressbar-value {
background: red;
//... other values ...
}
Here is working sample: plnkr
Upvotes: 3
Reputation: 13
Check here for info on theming: http://api.jqueryui.com/progressbar/
You should be able to define the colors by editing the main jquery-ui CSS, specifically the ui-progressbar class (for the main container) and the ui-progressbar-value class for the percentage/progress.
Upvotes: 1