There is the following construction, when you click into the first field, a mask is created for entering the phone, it is created by the connected jquery.maskedinput.min.js script on the #phone #phone When you click on the second identical field, the mask is not created, I think this is because of what I incorrectly pointed out function call, help fix.
$(document).ready(function() { $("#phone").mask("+7(999) 999-9999"); }); .form { margin: 10px 0px; } .form input { height: 36px; padding: 0px 10px; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.min.js"></script> <div class="form"><input type="text" placeholder="Телефон" id="phone" ></div> <div class="form"><input type="text" placeholder="Телефон" id="phone" ></div>