If you can not modify the HTML code properly, as mentioned by @connexo.
You can use this selector:
".ad_numbers input[type=radio][checked]"
Something like this:
$(function() {
var checked = $(".ad_numbers input[type=radio][checked]")[0];
console.log($("#" + checked.value).text());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
down vote favorite I have matching input and label elements:
<div class="ad_numbers">
<input type="radio" name="ad_pos" value="6" />6<br>
<input type="radio" name="ad_pos" value="7" />7<br>
<input type="radio" name="ad_pos" value="8" checked/>8<br>
<input type="radio" name="ad_pos" value="9" />9<br>
<input type="radio" name="ad_pos" value="10" />10<br>
<input type="radio" name="ad_pos" value="11" />11<br>
<input type="radio" name="ad_pos" value="12" />12<br>
</div>
<div class="ad_numbers ad_prices">
<label for="6" id="6">$50</label>
<label for="7" id="7">$45</label>
<label for="8" id="8">$40</label>
<label for="9" id="9">$35</label>
<label for="10" id="10">$30</label>
<label for="11" id="11">$25</label>
<label for="12" id="12">$20</label>
</div>
Update:
Based on @connexo suggestion.
The proper selector is:
".ad_numbers input[type=radio]:checked"
$(function() {
var checked = $(".ad_numbers input[type=radio]:checked")[0];
console.log($("#" + checked.value).text());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
down vote favorite I have matching input and label elements:
<div class="ad_numbers">
<input type="radio" name="ad_pos" value="6" />6<br>
<input type="radio" name="ad_pos" value="7" />7<br>
<input type="radio" name="ad_pos" value="8" checked/>8<br>
<input type="radio" name="ad_pos" value="9" />9<br>
<input type="radio" name="ad_pos" value="10" />10<br>
<input type="radio" name="ad_pos" value="11" />11<br>
<input type="radio" name="ad_pos" value="12" />12<br>
</div>
<div class="ad_numbers ad_prices">
<label for="6" id="6">$50</label>
<label for="7" id="7">$45</label>
<label for="8" id="8">$40</label>
<label for="9" id="9">$35</label>
<label for="10" id="10">$30</label>
<label for="11" id="11">$25</label>
<label for="12" id="12">$20</label>
</div>