Change JQuery Raty ReadOnly value after user click

jquery, jquery-plugins

Solution

You need to unbind the click events on the `img`

$('#star').raty({
    click: function(score, evt) {
        $(this).find('img').unbind('click');
        // $(this).find('img').unbind(); <-- this removes all listeners
    }
});
​

http://jsfiddle.net/xnZVd/

Problem

I want to make Raty read-only in the click event, but it does not work: ``` $('#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

Original source