开发者

Replacing the 'reset' button with a normal star when using RateIt for jQuery

开发者 https://www.devze.com 2023-03-04 12:32 出处:网络
Using rateit, a plugin for jQuery, to replace a select element with stars. The problem is that the reset button takes the place of the first star and when the resetable variable is set to false, t开

Using rateit, a plugin for jQuery, to replace a select element with stars.

The problem is that the reset button takes the place of the first star and when the resetable variable is set to false, t开发者_JAVA百科he first select option simply isn't available, but when it is true, the hover & selected effects don't work as a user will expect.

I have tried changing the image of the reset button but it behaves incorrectly.

Here is is with resetable set to false. The first star is gone, and my minimum selection value is 2

Here it is with resetable set to true, see how the first star hover/selected effect doesn't work as expected, but I can get my first value.


When you use the Rateit plugin to progressively enhance a select list you need to include a option for 0 i.e. no stars. Do this and everything starts to work nicely.

http://jsfiddle.net/ru2wh/7/

0

精彩评论

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