Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When set properity "ReadOnly = true",I can't set value by this method "$ ('# star'). Raty ('score', number);" #202

Open
fish-palm opened this issue Mar 17, 2017 · 2 comments

Comments

@fish-palm
Copy link

When set properity "ReadOnly = true",I can't set value by this method "$ ('# star'). Raty ('score', number);"
Can I set value like '<input readonly>'

HTML:
<div id="star_one"></div> <div id="star_two"></div>

JavaScript:

$(function(){
         $("#star_one").raty({
		readOnly : true,
	  });
	  $("#star_two").raty({
		click: function(score, evt) {
		  $("#star_one").raty("score",score);//Unable to assign a value
         });
});
@fish-palm
Copy link
Author

do just like this?
$("#star_one").raty("readOnly",false).raty("score",allScore).raty("readOnly",true);

@wbotelhos
Copy link
Owner

Hi,

Yes, you need to turn of the readOnly first, so you'll be able to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants