Is there a way to dynamically add a class to the body tag and the parent element when clicking on radio buttons?
For example, consider the following code snippet:
<form action="">
<input type="radio" value="layout1">Layout 1<br>
<input type="radio" value="Layout2">Layout 2<br>
<input type="radio" value="Layout3">Layout 3
</form>
Upon clicking the radio button with the value 'layout1', the body tag should receive a class 'a'. Subsequently, clicking on other radio buttons should change the class to 'b' and 'c' respectively.