var rad=$('input:radio[name=mobileradiogroup_1]:checked');
if(localStorage.getItem('Side')=='buy')
{rad.val('2');
}
else
{rad.val('1');}
This is not changing the option value so am hoping you can help with this.
Thanks!
var rad=$('input:radio[name=mobileradiogroup_1]:checked');
if(localStorage.getItem('Side')=='buy')
{rad.val('2');
}
else
{rad.val('1');}
This is not changing the option value so am hoping you can help with this.
Thanks!
Hi Aeneas.
Please use following code:
pre
//Note: you should replace "mobileradiogroup_17" with your mobileRadioButtonGroup component block.
var mobileRadioGroupComponentName = "mobileradiogroup_17";
//This is your radio component value that's you need to bee checked.
var valueNeedToBeSelected = "Item 1";
Apperyio(mobileRadioGroupComponentName).find('input[value="' + valueNeedToBeSelected + '"]').prop("checked", true).trigger("click");
/pre
Regards.
Works a charm, thanks for your prompt reply!