jsFiddle에서 코드를 업로드합니다. 거기에서 볼 수 있습니다. 당신이 링크를 클릭하면 DIV를 다른 Divs 위에 표시하는 방법
는 숨겨진 FAQ 섹션이 표시됩니다, 그것은 아래로 다른 div를 밀어 것입니다. 그러나 그것은 내가 원하는 것만은 아니며, 다른 모든 div가 있어야하며, 숨겨진 FAQ 섹션이 맨 위에 뜬다. 그것을하는 방법을 모르십시오. 이것이 HTML, CSS 또는 jQuery에서 수행되어야하는지조차 확실하지 않습니다.내 jQuery 코드 :
$(function(){
$(".OpenTopMessage").click(function() {
$("#details").slideToggle("slow");
});
});
HTML 코드 :
<div style="border: 1px solid #000;">
<span>link</span>
<span> | </span>
<span>link</span>
<span> | </span>
<span>link</span>
<span> | </span>
<span>link</span>
<span> | </span>
<span>link</span>
<span> | </span>
</div>
<div id="faqBox">
<table width="100%">
<tr><td><a href="#" id="openFAQ" class="OpenTopMessage">this is hte faq section</a></td>
</tr>
</table>
<div id="details" style="display:none">
<br/><br/><br/><br/><br/><br/><br/><br/>
the display style property is set to none to ensure that the element no longer affects the layout of the page
<br/><br/><br/><br/><br/><br/><br/><br/>
</div>
</div>
<br/><br/>
<div style="background:#c00;">other stuff heren the height reaches 0 after a hiding animation, the display style property is set to </div>
다음 번에 쉽게 읽을 수 있도록 CSS를 숨길 수 있습니까? –