email.onblur = function() { validate_data('email',$('#email').val(),0); $('#email').mailgun_validator({ api_key: 'key', in_progress: validation_in_progress, // called when request is made to validator success: validation_success, // called when validator has returned error: validation_error, // called when an error reaching the validator has occured }); }; there is such a code for checking email, the first function is user, the second is anonymous from the library. In this case, email is the input id. An example is taken from here: link1 The problem is that when you remove the focus for the first time, only the first function is triggered, when you do everything again, two functions are worked out. What is the problem?
UPD full call code: just wrapped in $(document).ready(function () { }); Used library mailgun, jquery plugin. Documentation here link
onblurabsolutely nothing to do with. probably you do it somewhere in modalke, and modal ayaksom tightens ..... you need to dounbindevents .... you need to look at the whole code, including it happens in add. window or not - Alexey Shimanskyemail.bluris located .... I assume that it is in some block a la$("selector").click(function(){- Alexey Shimanskymailgun_validatoris an asynchronous function, just does not have time to return the answer right away - Grundy$(document).ready(function () { });where doesemailcome from? - Alexey Shimansky