This is the code. i just want to hide message when i press backspace key, i don't know why it is not going away on backspace other than that it works fine.
//on keypressed in textbox
$(".phone").keypress(function (e) {
if (e.which == 8 ){
$(".errmsg").hide();
}
//if not numeric, then it don't let you type
if (e.which != 8 && e.which != 43 && e.which != 45 && (e.which < 48 || e.which > 57)) {
debugger
//display error message
$(".errmsg").html("Digits Only").show();
e.preventDefault();
} else {
debugger
$(".errmsg").hide();
}
});