가능한 경우 도움이 필요하십니까?jQuery slideToggle과 동일한 두 개의 사업부가 있지만 그 중 하나만 작동합니다.
미리 답변 해 주셔서 감사합니다.
여기 내 문제입니다.
두 개의 동일한 div가 연속으로 있습니다. 그들은 h3과 p를 포함합니다. h3을 클릭하면 슬라이드가 표시됩니다. p.
slideToggle은 첫 번째 div에서 제대로 작동하지만 두 번째 div에서는 전혀 영향을주지 않습니다.
내가 잘못 될 수있는 아이디어가 있습니까 ??
내 코드는 다음과 같습니다 ...
HTML
<section class="twocol">
<div id="accordionPanel">
<h3 class="accordionControl">This is the title of the content area</h3>
<p class="accordionText">Lorem ipsum dolor sit amet, no per erant dicant tritani. Et reque aperiam fabulas nec. Vim ne pericula tincidunt. Id perpetua constituam quo, feugiat pertinax referrentur at per.</p>
</div>
</section>
<section class="twocol">
<div id="accordionPanel">
<h3 class="accordionControl">This is the title of the content area</h3>
<p class="accordionText">Lorem ipsum dolor sit amet, no per erant dicant tritani. Et reque aperiam fabulas nec. Vim ne pericula tincidunt. Id perpetua constituam quo, feugiat pertinax referrentur at per.</p>
</div>
</section>
CSS
#accordionPanel {
@include lightgreygradient;}
.accordionControl {
&:hover {cursor: pointer;}
}
.accordionText {display:none;}
자바 스크립트
,210
너무 똑같습니다. –