Answer the question
In order to leave comments, you need to log in
How to make it so that when you click on the dropdown arrow, the block collapses?
How to write code correctly so that when you click on " " , a specific block is collapsed, namely ?
HTML written in script:<div class="list"></div>
<div class ="scroll"></div>
<div class="left__block__info">
<li class="first_message"></li>
<select class="list"></select>
<div class="border"></div>
<div class="scroll"><li class="second_message"></li></div>
</div>
function scrollComments ( scrollUp ) {
scrollUp.slideToggle( );
};
$('body') .on('click', 'select.list', function( event ) {
event.preventDefault();
let scrollUp = $(this).parents('.scroll');
scrollComments(scrollUp);
});
Answer the question
In order to leave comments, you need to log in
Through DOM traversal, can display:none; block
The first guide in the search
https://professorweb.ru/my/javascript/jquery/level...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question