I Have a problem with jquery event handler after async postback on asp.net page. I read this topic - it's a good solution, but I need a separate function. So I'm using jquery masked plugin.
My js code now is:
<script type="text/javascript">
jQuery(document).ready(function () {
  var control = $("#txtCustomerPhone");
  InitPhonePattern(this, control);
  var prm = Sys.WebForms.PageRequestManager.getInstance();
  prm.add_endRequest(InitPhonePattern(this, control));
 });
 function InitPhonePattern(sender, args) {
  $(args[0]).mask("+7 (999) 999-99-99", { completed: 
    function () {
    $('#btnCheckCustomerPhone').click();} 
  });
}
</script>
As you see mask was initialized 2 times: on document Ready() and after async postback (on endRequest()). But mask plugin is not mapped after async postback.
Someone understands problem? I would be grateful for help!
 
     
    