Star Rating Widget problem with split stars
I'm trying to implement the Star Rating Widget with 5 stars split in half, but all I'm getting is 2 and a half stars where there should be 5.
I'm following the demo on the official site: http://orkans-tmp.22web.net/star_rating/index.html#main-menu=2&demo-tabs=4
As explained there, all I've done is
$(this).stars({ split: 2 });
If I set split: 1 everything works ok. I guess there's a problem with the width, but my css/js skills are really low.
I've found a similar question ( wrong rendering of star rating jquery star rating widget and split stars ) but it doesn't help me开发者_开发知识库 that much.
Thanks!
Edit: link to fiddle: http://jsfiddle.net/Xu9pM/1/ It doesn't load the star, I hope it serves you anyway
Edit: update with a general view of the output along with the HTML and CSS
That is absolutely correct behaviour! If you have originally 5 radio buttons, and you split them by 2, then you'll have 2,5 stars, because each radio button is represented by a star/2.
You should start with 10 radio buttons to end up with 5 stars split in half.
In other words, no matter how much you split the stars, each piece will always represent ONE input (ie. radio button)
All the best. The author :)
Without further seeing your HTML code and full CSS, try setting the width like so:
td, #ratings {
width: 100px;
}
精彩评论