【发布时间】:2017-02-27 17:30:10
【问题描述】:
我正在使用 jQuery Raty JS,我希望得分总是在 0.5 的区间内,无论它在哪里点击星星 例如。 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5
预期结果:星星应该以 0.5 的间隔显示
目前,代码是这样的
$('#custom_p').raty({
half: true ,
halfShow : true,
precision : true,
round : { down: .25, full: .6, up: .76 },
click: function(score, evt) {
alert('ID: ' + this.id + "\nscore: " + score + "\nevent: " + evt);
}});
可能需要查看圆形参数
【问题讨论】:
-
precision: false可能会成功... -
也试过了,不行