0
첫 번째 단추 모음을 만들고 복제하지 않고 단추 모음을 복제하는 데 문제가 있습니다. 내 시도에서 두 번째 단추 모음을 제대로 작동하지 않습니다. 단추를 클릭하면 아무 것도 수행되지 않습니다. 모든 중복 된 단추 표시 줄을 새롭고 독립형으로 유지하겠습니다. 이것에 대한 도움이 있으면 대단히 감사하겠습니다. 예를 들어 내 작업 코드를 참조하십시오. 기본적으로 .clone()
이벤트 핸들러를 복사하지 않기 때문에 복제 된 섹션 내부복제하지 않고 버튼 모음 복제
<div id="pfs-tab3" class="tab">
<div class="duplicate-sections">
<div class="form-section">
<section class="duplicate-container">
<div class="tabs">
<ul class="tab-links main-tab-links button-bar" style="margin-top:0;">
<li class="active"><a href="#notes-tab1">box 1</a></li>
<li><a href="#notes-tab2">Box 2</a></li>
</ul>
<div class="tab-content" style="max-height: 125px;">
<div id="notes-tab1" class="tab active">
<div class="tab-content-scroll button-bar-scroll button-bar-scroll-notes">
<div class="text-field" style="max-width:375px;">
<p class="checkbox-label">Name</p><input type="text" class="text-box-column">
</div>
</div> <!-- End .button-bar-scroll -->
</div> <!-- End .notes-tab1 -->
<div id="notes-tab2" class="tab">
<div class="tab-content-scroll button-bar-scroll button-bar-scroll-notes">
<div class="text-field" style="max-width:375px;">
<p class="checkbox-label">Amount</p><input type="text" placeholder="$" class="text-box-column">
</div>
</div> <!-- End .button-bar-scroll -->
</div> <!-- End .notes-tab2 -->
</div> <!-- End .tab-content -->
</div> <!-- End .tabs -->
</section> <!--duplicate-container -->
</div> <!-- End .form sections -->
</div> <!-- End .duplicate sections -->
<a class="btn btn-duplicate addsection" href="#" role="button" data-section='0'>+ Add</a>
http://codepen.io/EBM84/pen/RKyNpE?editors=1010
'jQuery를 ({...}), 기능 (예를 들어 '클릭')에서,'위임 할 필요가 ('탭 .tab - 링크가. ").이 선택기와 마찬가지로 행 선택기를 추가하고 제거하십시오. – mhodges