I want to say so thanks to Aristos for help and in the right direction! In your code, I corrected only this line:
jQuery(document).ready(Init);//direct transfer function not work;
Thus, the final code is as follows:
<script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(EndRequest); function EndRequest(sender, args) { Init(); } $(document).ready(function () { Init(); }); function Init() { var control = $('#txtCustomerPhone'); InitPhonePattern(control); } function InitPhonePattern(args) { $(args).mask("+7 (999) 999-99-99", { completed: function () { $('#btnCheckCustomerPhone').click(); } }); } </script>
Mikka source share