People, please help. I do the repair cost calculator. I use jQuery. There are many fields, I will give an example of one of them, on which you need to understand. I do not understand why the variable radio111 does not get the value, but undefined.
<input type="radio" id="kbut" value="2150" name="radio111"> <label for="kbut" style="margin-right: 40px">Квартира</label> <input type="radio" id="taunbut" value="2200" name="radio111"> <label for="taunbut">Коттедж/Таунхаус</label> $('.formclass input').change(function(){ var radio111 = $('input[name="radio111"]:selected').val(); console.log(radio111); });