Why is this switch-case not working? I've tried every possible syntax, but it is just not working. Or is a switch-case the wrong method in this case?
jQuery('#main input').blur(function() {
switch(jQuery(this).attr('name') {
case 'email':
jQuery(this).val('That's you e-Mail adress.');
break;
case 'nickname':
jQuery(this).val('That's your nickname.');
break;
}
});
Please note: I am using jQuery in non conflict mode, that's why I use jQuery
instead of $
.