May*_*sam 3 jquery jquery-plugins
我想在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
});
Run Code Online (Sandbox Code Playgroud)
您需要取消绑定上的点击事件 img
$('#star').raty({
click: function(score, evt) {
$(this).find('img').unbind('click');
// $(this).find('img').unbind(); <-- this removes all listeners
}
});
?
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3155 次 |
| 最近记录: |