raty icon indicating copy to clipboard operation
raty copied to clipboard

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

Open fish-palm opened this issue 8 years ago • 2 comments

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 avatar Mar 17 '17 09:03 fish-palm

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

fish-palm avatar Mar 17 '17 09:03 fish-palm

Hi,

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

wbotelhos avatar Mar 17 '17 14:03 wbotelhos