Answer the question
In order to leave comments, you need to log in
Why does the script work every other time?
On this page https://www.ydacha.org/taunhaus-100-kv-m-udacha-ju...
The documentation section at the very bottom should open as a spoiler.
The elementary script works every other time, sometimes you need to refresh the page to make it work, sometimes it just works. What could be the reason? Are there any errors in the console? Worth autooptimize , but I chopped it off, it only got worse.
The script itself:
// Раздел с документами
function openDocs($popup, height) {
var $doc_box = $popup.find('.documents_box'),
$popup_box = $popup.find('.popup_box'),
$arrow = $('.js-open-doc'),
$bg = $popup.find('.popup_background');
changePopupHeight($popup);
$arrow.click(function () {
console.log('check')
$doc_box.stop().slideToggle(300);
$arrow.toggleClass('arrow_up');
});
}
$('.open-doc-list').click(function() {
console.log('check')
$(this)
.find('.img-block')
.toggleClass('arrow_up')
.closest('.documents_block')
.find('.documents-content')
.slideToggle(300);
});
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