There is a phone entry field. Dvizhek and nearby services want to use phones without +7 or 8
There is a usual input mask on this water field. http://digitalbush.com/projects/masked-input-plugin/ Mask is set
$("#telephone").mask("(999) 999-9999"); As a result, we see: (___) __-____
Juzveri often do not notice in the mask +7 and enter phones from 8
Question. How to track the first character entered and delete +7 or 8?
$('.limitInput').keyup(function(){ var count = $(this).val().length; alert(count);}); does not work, since alert (count) will always return 14 characters (the mask has already been set).