JQuery get current value of radio box selection
jquery
Solution
$('input:radio[name=bulding_height]:checked').val();
OR
$('[name=bulding_height]:checked').val();
Problem
I have a form where I have radio button field such as: ``` <p><ul> <li><label for="id_building_height_0"><input checked="checked" name="building_height" value="1" id="id_building_height_0" type="radio" class="can_update_spans" /> 1 Story</label> </li> <li><label for="id_building_height_1"><input value="2" type="radio" class="can_update_spans" name="building_height" id="id_building_height_1" /> 2 Stories</label></li> <li><label for="id_building_height_2"><input value="3" type="radio" class="can_update_spans" name="building_height" id="id_building_height_2" /> 3 Stories</label></li> </ul></p> ``` My question is - how can I get the current value for whatever `$("input:checkbox[name='bulding_height']")` is currently set to? Any help much appreciated.