Check Radio button on div click
css, html, jquery
Solution
How about that: http://jsfiddle.net/sgospodarets/QqVCu/5/ ? All that is necessary - wrap inputs in label. Then do not need JavaScipt.
Problem
I would like radio button to check/uncheck whenever i click it's parent div. Radio buttons are originally hidden. I was trying to achieve that by wrapping `<label>` around the div. It works, but `jQ.toggleClass` stops working. HTML ``` <div class="big"> This is a div 1 <input id="chb" type="radio" /> </div> <br/> <div class="big"> This is a div 2 <input id="chb" type="radio" /> </div> ``` CSS ``` .big { width:100px; height:100px; background-color:red; cursor:pointer; } .hli { border:2px solid blue; } /*.chb{display:none;}*/ ``` JQ ``` $('.big').click(function() { $('.hli').toggleClass('hli'); $(this).toggleClass('hli'); }); ``` JSFIDDLE: http://jsfiddle.net/QqVCu/2/