Question and answer is powered by AnsPress.io
I get this error jQuery(…).find(…)[i].addClass is not a function
when I using this code:
<script type="text/javascript"> if(res.length>0) { jQuery('.text_order_get').val(res[0].comment); for(var i=0; i<res[0].rating; i++){ jQuery('#stars').find('.star')[i].addClass('selected'); } } </script>