なぜこれが機能しないのですか?ラベルを"$(this).toggleClass('checked');"
オンにalert('test')
してクリックすると、警告ウィンドウが表示されます:-/
$(document).ready(function(){
$("label").click(function(){
$(this).toggleClass('checked');
});
});
<input type="radio" name="hours" id="hours1" value="xyz" style="display: none" />
<label for="hours1">10:00</label>
<input type="radio" name="hours" id="hours2" value="xyz" style="display: none" />
<label for="hours2">11:00</label>