I have code
$options = array('hours' => 'Hours', 'km' => 'Km', 'unit' =>"Unit");
$attributes = array('legend' => false);
echo $this->Form->radio('unit_type', $options, $attributes);
Now I would like to check which radio button is checked in javascript. I used
$("input[name='data[Equipment][unit_type]']:checked").val();
but it's not working.