简体   繁体   English

jQuery星级评分插件无法识别{split:4}

[英]jQuery Star Rating Plugin is not recognizing {split:4}

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. 我在ASP.NET MVC网站上使用jQuery Star Rating插件 ,我无法使用分裂星。 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). 我已经尝试过使用RadioButton辅助方法和纯HTML,我也尝试过使用和不使用禁用输入(在这个特定页面上,我打算使用禁用)。 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. 当页面加载时,它会将所有单选按钮转换为星星,但不是将5颗星分成四分之一,而是显示没有分割的20颗星。 Any ideas what I'm missing? 我缺少什么想法?

Nevermind, I found the problem. 没关系,我发现了问题。 I wasn't including jquery.MetaData.js, just the jquery.rating.js file. 我没有包括jquery.MetaData.js,只是jquery.rating.js文件。 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. 它没有在下载页面上列为必需文件,只是作为相关文件,但演示需要它而不提及它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM