Hey there! So, I have a situation where I'm working with two radio buttons and I want to apply certain CSS styles to the parent box (<div>
) when a radio button is selected (checked). Here's how I want it to look:
box-shadow: 0 0 5px #5cd053;
border-color: #28921f;
Below are my radio buttons within div elements:
<div class="delivery_option alternate_item">
<input class="delivery_option_radio" type="radio" name="delivery_option[0]" onchange="mydisplayudpate();updateCarrierSelectionAndGift();" id="delivery_option_0_1" value="6," checked="checked">
</div>
<div class="delivery_option item">
<input class="delivery_option_radio" type="radio" name="delivery_option[0]" onchange="mydisplayudpate();updateCarrierSelectionAndGift();" id="delivery_option_0_0" value="7,">
</div>
I've been using jQuery for other functionalities related to these buttons, however, I'm a bit uncertain on how to correctly add the border and box shadow only when a radio button is selected. Any tips on this would be greatly appreciated!