Answer the question
In order to leave comments, you need to log in
How to make the cursor always be at the beginning in the phone mask?
When you click on the phone input field of the pop-up form, you need the cursor to automatically go to the very beginning, now it’s very difficult to get, then in the middle then at the end, you need to click on any area to get to the very beginning.
The script for the mask now looks like this:
jQuery(function($){
$("#pop_phone").mask("+7(999) 999-9999");
});
Answer the question
In order to leave comments, you need to log in
what you threw in the same place still the cursor does not rise to the beginning
This is done very simply, look, after +7 you have _____. And because of it, the cursor is placed at the end. We just remove the underscore and the cursor will always fall after +7 and besides, with the ability to edit the number without erasing :)
jQuery(function($){
$("#pop_phone").mask("+7(999) 999-9999", {placeholder: "" });
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question