I am using this masked input plugin and I would like to check when the field is empty. Below is what I have tried but it does not seem to work:
HTML
<input type="text" name="phone" id="phoneid" />
Le JavaScript:
$("#phoneid").mask("999-999-9999");
This code does not work
$("#phoneid").keyup(function(){
if($("#phoneid").val().length == 0){
alert(111);
}
});