Closed KennethDanielsen closed 9 years ago
Maybe using the data-value field to build your CSS selector?
.rating-input i {
color: black; //Black for 1 to 4
}
.rating-input i[data-value=5] {
color: yellow; //Yellow for 5
}
.rating-input i[data-value=6] {
color: red; //Red for 6
}
Hi there,
Awesome plugin!
I'm looking for a way to change the color of my stars depending on the active rating (I'm using an icon font). Is there a way to add the current/active rating as a class or data-rating attribute to the rating-input container?
Thanks in advance