문제점 : 계시 데이터가 창 높이보다 큰 경우, 스크롤하면 페이지에서 닫기 아이콘이 이동합니다. 나는 끈적 끈적하게 만들어서 맨 위로 스크롤하지 않고 페이지를 닫을 수있는 옵션을 항상 갖고 싶습니다.기초 6 끈적 닫기 버튼
예를 들어 공개로 6 .sticky
예제를로드하려고했지만 성공한 시도는 없습니다.
이것은 내가 작동해야한다고 생각합니다. 이것은 공개 컨테이너 <div id="modal2" style="height: 100%"></div>
을 통해 ajax를 통해로드됩니다. 불행히도 닫기 버튼은 내용과 함께 스크롤됩니다.
<script>
// this script cannot be located in the layouts.js,
// because the trigger doesn't exist at page load.
$('#close-modal2').click(function(){
// $('#modal2').foundation('close'); didn't work for some reason.
// 'open' closes all other modals, so it accomplishes what I need.
$('#modal').foundation('open');
});
</script>
<div>
<button id="close-modal2" class="close-button sticky"
aria-label="Close reveal" type="button" data-sticky>
<span aria-hidden="true">×</span>
</button>
</div>
<div id="paragraph-wrapper" data-sticky-container>
<div class="row">
<div class="small-11 small-centered columns">
<div> Lots of content here, enough to overflow window...</div>
<div> Losts of content here..... etc.</div>
</div>
</div>
</div>
나는 뭔가가 있습니까? 다른 누군가가 공개적으로 끈적 거리는 닫기 버튼을 얻을 수 있었습니까?