Answer the question
In order to leave comments, you need to log in
How to collapse a list after selecting an item in it?
Hello!
There is a list of divs, you need to collapse it when selecting / clicking on any position from the list.
<div id="markerlist">
<div><a href="#" class="title">ул. 23-го Августа, 43</a></div>
<div><a href="#" class="title">ул. Академика Павлова, 305/307</a></div>
<div><a href="#" class="title">ул. Энвера Ахсарова, 21</a></div>
<div><a href="#" class="title">ул. Блюхера, 18б</a></div>
<div><a href="#" class="title">ул. Блюхера, 23е</a></div>
</div>
Answer the question
In order to leave comments, you need to log in
Something like this
$("#markerlist").on("click","div", function(){
$('#markerlist div').hide();
$(this).show();
return false;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question