<script>
function handleEvents()
{
//Call the function in page load
Check();
$("input[title$='CheckBoxFieldName']").change(function(){
//Call the function in change event
Check();
});
}
function Check()
{
if($("input[title$='CheckBoxFieldName']").is(':checked'))
{
$("nobr:contains('FieldName ToHide')").parent('h3').parent('td').parent('tr').show();
$("h3.ms-standardheader:contains('FieldName ToHide')").closest("tr").show();
}
else
{
$("nobr:contains('FieldName ToHide')").parent('h3').parent('td').parent('tr').hide();
}
}
_spBodyOnLoadFunctionNames.push("handleEvents");
</script>
Thank you !!!
ReplyDelete