Checking a radio box via with the following code;
Hi I have the following code;
- $('#resultsBox>div>img').each(function(index){
- if($('#'+(index+1)).attr('data-color')==a4){
- $('#'+a4+'_'+index).attr('checked', true).checkboxradio('refresh');
- };
- });
The function runs through four images if one has the corresponding data-colour it checks a corresponding radio button.
When I use (index) it only works on the first call but there after doesn't.
Can anyone help?