简体   繁体   中英

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. 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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