Updating radio group based on localstorage variable not working

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!
1 person has
this question
+1
This topic is no longer open for comments or replies.