开发者

Odd results using jQuery rating plugin

开发者 https://www.devze.com 2022-12-25 16:37 出处:网络
I use a for loop to generate my stars. I want them split into four so I use class=\"star {split:4}\" I want 5 stars, so I need 20 loops (4splits * 5stars = 20). When it hits 17, it echo\'s

I use a for loop to generate my stars. I want them split into four so I use

class="star {split:4}"

I want 5 stars, so I need 20 loops (4splits * 5stars = 20). When it hits 17, it echo's

 checked="checked"

However, in the browser, my script displays 30 stars with 25 and a quarter stars highlighted!

Here's my line in PHP

<input type="radio" class="star {split:4}" disabled="disabled" <?php echo $i == $row['rating'] ? 'checked="checked"' : "" ?>/>

Also开发者_StackOverflow, I do have the metadata plugin.


Fixed it.. each set of stars needs to have a unique name. Durr

0

精彩评论

暂无评论...
验证码 换一张
取 消