我想在click事件中将Raty设为只读,但它不起作用:
$('#number').raty({
click: function(score, evt) {
readOnly: true; //it does not work here
$.get(
"../../ajax/test.aspx",
{r:score},
function (data) { alert(data); },
"html"
);
},
scoreName: 'entity.score',
number: 10
});Raty Home Page
发布于 2012-04-04 20:32:54
您需要解除绑定img上的单击事件
$('#star').raty({
click: function(score, evt) {
$(this).find('img').unbind('click');
// $(this).find('img').unbind(); <-- this removes all listeners
}
});
http://jsfiddle.net/xnZVd/
https://stackoverflow.com/questions/10010954
复制相似问题