Please have a look on the following:
$(\'#myRadio\').change(function() {
if($(this).is(\':checked\')) {
$(this).parent().addClass(\'
Here is the solution which worked great for me:
var $boxes=$('input:radio');
var $parents = $boxes.parent();
$boxes.click(function(){
$parents.filter('.selected').removeClass('selected');
$(this).parent().addClass('selected');
});
$boxes.filter(':checked').parent().addClass('selected');
Features:
Hope this helps!