I have html in my form that looks like this. First, is this code malformed or something? Second, when the selected radio changes, how do I get the value of the selected radio? I do $('#form_options').change(function(){ }); but what goes inside to get the value of the selected button
<div id="form-options">
<label for="options">Choose an option</label>
<Label for="morning">
<input type="radio" name="options" id="options-morning" value="morning" />Morning
</label>
<label for="options-night">
<input type="radio" name="options" id="options-night" value="night" />Night
</label>
<label for="options-evening">
<input type="radio" name="options" id="options-evening" value="evening" />Evening
</label>
</div>
Your div id is wrong. You need
$('#form-options')instead of$('#form_options')Try this:
You can try it here – http://jsfiddle.net/FloydPink/PF8qX/