In the following example,
isAgeSelected is a checkbox and txtAge may be anthing like textbox or div area.
$('#isAgeSelected').is(':checked') ? $("#txtAge").show() : $("#txtAge").hide();
In the following example,
isAgeSelected is a checkbox and txtAge may be anthing like textbox or div area.
$('#isAgeSelected').is(':checked') ? $("#txtAge").show() : $("#txtAge").hide();
$(document).click(function(e) {
var target = e.target;
if (!$(target).is('#menu') && !$(target).parents().is('#menu')) {
$('#menu').hide();
}
});
$(function() {
var $213 = "Yes";
$("input[name=sv_213][value="+$213+"]").attr('checked', true);
});
Refer :
http://jsfiddle.net/CW8AC/
$('input[name=radioName]:checked', '#myForm').val()