I am writing a code for kendo UI mobile in which i want to show a particular div on check on of check box for this i am writing a function as follows
function showDetails(){
// debugger;
var data = $("#vehicleLoan").attr('checked');
// alert(data);
if(data)
{
$("#Loan").removeAttr("style","display:block");
}
else
{
$("#Loan").removeAttr("style","display:none");
}
}
but i am getting an undefined at data.
Can you try using,
var data = $("#vehicleLoan").is(':checked');
OR
function showDetails(){
$("#Loan").toggle();
}
OR
function showDetails(){
// debugger;
var data = $("#vehicleLoan").is(':checked');
// alert(data);
if(data)
{
$("#Loan").show();
}
else
{
$("#Loan").hide();
}
}