I have written an if statement in jQuery.
My code:
if($('#customer0').checked())
{
$('#shop').fadeOut();
}
else if($('#customer1').checked())
{
$('#shop').fadeIn();
}
else ($('#customer2').checked())
{
$('#shop').fadeOut();
};
When I have if (custmer0) and else (customer1) the fadeOut and fadeIn work good. But when it’s customer2 (that is else statement) it is not working? What is wrong?
else doesn’t take any parameters. The code below is more applicable: