Answer the question
In order to leave comments, you need to log in
Incorrect work of JS on mobile, how to solve the problem?
Hello!
The site implements the disclosure functionality when clicking on a block, that is, when you click on element1, another element2 is shown, when you click on element1 again, element2 is hidden.
Implemented with the following JS code:
$('.raz').on('click', function(){
var $that = $(this),
nc = $that.next('.del').length,
block = nc ? $that.next('.del') : $that.parent('.del');
block.slideToggle(function(){
$('.raz',block).add(block.prev('.raz'))
.text(block.is(':visible') ? 'Скрыть' : 'Показать номер телефона');
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question