最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jQuery Star Rating Plugin is not recognizing {split:4} - Stack Overflow

programmeradmin2浏览0评论

I'm using the jQuery Star Rating plugin on an ASP.NET MVC site, and I can't get it to work with split stars. As best I can tell, I'm creating the proper radio buttons. I've tried using both the RadioButton helper method and pure HTML, and I've also tried with and without disabled inputs (on this particular page, I intend to use disabled). Here's what I've got on the page right now:

<input class="star {split:4}" type="radio" disabled="disabled" value="1" name="Rating"/>
...
<input class="star {split:4}" type="radio" disabled="disabled" value="19" name="Rating" checked="checked"/>
<input class="star {split:4}" type="radio" disabled="disabled" value="20" name="Rating"/>

When the page loads, it converts all the radio buttons to stars, but instead of 5 stars split into fourths, it shows 20 stars without splits. Any ideas what I'm missing?

I'm using the jQuery Star Rating plugin on an ASP.NET MVC site, and I can't get it to work with split stars. As best I can tell, I'm creating the proper radio buttons. I've tried using both the RadioButton helper method and pure HTML, and I've also tried with and without disabled inputs (on this particular page, I intend to use disabled). Here's what I've got on the page right now:

<input class="star {split:4}" type="radio" disabled="disabled" value="1" name="Rating"/>
...
<input class="star {split:4}" type="radio" disabled="disabled" value="19" name="Rating" checked="checked"/>
<input class="star {split:4}" type="radio" disabled="disabled" value="20" name="Rating"/>

When the page loads, it converts all the radio buttons to stars, but instead of 5 stars split into fourths, it shows 20 stars without splits. Any ideas what I'm missing?

Share Improve this question asked May 14, 2009 at 3:55 Dave CowartDave Cowart 7917 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 11

Nevermind, I found the problem. I wasn't including jquery.MetaData.js, just the jquery.rating.js file. It's not listed as a required file on the download page, just as a related file, but the demos require it without mentioning it.

发布评论

评论列表(0)

  1. 暂无评论