I have the following HTML that creates a radio button group using Bootstrap.
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn" type="button" name="rating" value="1">
<img ...>
</button>
<button class="btn" type="button" name="rating" value="2">
<img ...>
</button>
<button class="btn" type="button" name="rating" value="3">
<img ...>
</button>
<button class="btn" type="button" name="rating" value="4">
<img ...>
</button>
</div>
<button class="btn" type="submit" name="submit">Submit</button>
Based on user selection, I want to send the variable in the form from the radio group named "rating" with the value assigned to whatever the selected button's value is. How would I do this in jQuery?