when the contents are loaded with ajax, the mask is not working on the input text.
What Should I do?
with thanks
Code:
$.ajax({url: path, data: {action:'create_form_profile'}, timeout:5000, type:"POST", success: function(data) {
$("#_content").html(data);
{
$("#birth_date").mask("9999/99/99");
}
$("input:hidden").click(function(event) {
window.location.href = "logout.php";
show_exit();
});
}
});
For me works this in ajax callback:
I don't understand why adding the same mask second time disables it..
I found the reason ;)
jquery.hotkeys-0.7.9.min.js was the cause.
I have the following js files included:
and when I removed the second file, it was so
fire a change event on the input after changing its contents via ajax.
if the entire input comes from ajax then run the mask plugin on it and then fire the change event.
IE: