Answer the question
In order to leave comments, you need to log in
How to implement such output of phone number JS,ModX?
Hello!
How to implement such an output on click to display a phone number?
Placeholder not as I can not withdraw.
let tel = '';
$('.tel span').text('+7 9XX XXX XX XX').attr('title','Показать номер телефона').on('click',function(){
$(this).html(tel);
});
Answer the question
In order to leave comments, you need to log in
For example. Set the span ID to "Show phone number" and the block where the TV is located.
document.getElementById("show_phone").onclick = function() {show()};
function show() {
document.getElementById("phone").style.display="block";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question