Answer the question
In order to leave comments, you need to log in
Why does the code conflict?
I make a mask for a text field, and I do a check with water in this field: but for some reason only one code works
$(document).ready(function() {
//mask_form
// работает либо эта строка
$("#phone").mask(" +38-(099)-999-99-99");
// либо эта
$(".telephone").on('input', function () {
alert("Привит")
});
});
Answer the question
In order to leave comments, you need to log in
function on
you are not using the on() function correctly, read the attached link, if you don’t understand, write, I will explain
I think that the problem can be solved by making this code run first:
$(".telephone").on('input', function () {
alert("Привит")
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question