$('#example').popover(options) 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="info-content" class="info-content" style="cursor: pointer;"> <div class="info-content-title"> <div class="g-item" onclick="$('#info-content-body-1').toggle();">TEST</div> <div id="info-content-body-1" style="z-index: 100;display: none;"> <div class="info-close"> <a href="#" onclick="document.getElementById('info-content-body-1').style.display = 'none'; return false"> <img src="/media/maps/info_close.gif" alt="Закрыть"> </a> </div> <div class="info-content-body-item">Адрес: {{shop.addres}}</div> <div class="info-content-body-item">Часы работы: {{shop.workhours}}</div> <div class="info-content-body-item">Телефоны: {{shop.phones}}</div> <div class="info-content-body-link"><a href="/page/contact_maps/?shop={{shop.city.pk}}">Показать на карте</a> </div> <strong>{{metro.city.other_information}}</strong> {%endfor%} </div> <div id="info-content" class="info-content" style="cursor: pointer;"> <div class="info-content-title"> <div class="g-item" onclick="$('#info-content-body-2').toggle();">TEST2</div> <div id="info-content-body-2" style="z-index: 100;display: none;"> <div class="info-close"> <a href="#" onclick="document.getElementById('info-content-body-2').style.display = 'none'; return false"> <img src="/media/maps/info_close.gif" alt="Закрыть"> </a> </div> <div class="info-content-body-item">Адрес: {{shop.addres}}</div> <div class="info-content-body-item">Часы работы: {{shop.workhours}}</div> <div class="info-content-body-item">Телефоны: {{shop.phones}}</div> <div class="info-content-body-link"><a href="/page/contact_maps/?shop={{shop.city.pk}}">Показать на карте</a> </div> <strong>{{metro.city.other_information}}</strong> {%endfor%} </div> 

https://jsfiddle.net/mukav1bp/

now, when I click on TEST, I climb a block and move TEST2 down, I want him to climb over TEST2 and not break my structure

  • provide the code, pliz. I can assume that the TEST is necessary to occupy
  • Use the "Insert Film" button to add a code. The question should be self-sufficient, links to JSFiddle can only serve as a supplement. - Athari
  • @ user1931070 If you are given an exhaustive answer, mark it as correct. - Nicolas Chabanovsky

1 answer 1

For pop-up blocks, prescribe absolute positioning.
Example:

 #info-content-body-1 { position:absolute; background: #fff; } 
  • in!! Super, ATP - John Doe