嘗試將基金會Zurb的軌道特徵包含在模態中。模式需要爲每張幻燈片調整大小。模式窗口中的Zurb軌道沒有正確調整大小
目前它調整到最大幻燈片的最大高度(即整個模態窗口)。相反,我需要定位<li class="active">
並調整模式窗口大小以適應該元素。
<script>
$('#introModal').on('opened', function(){
$(window).trigger('resize');
});
$("#introModal").on("after-slide-change.fndtn.orbit", function(event, orbit) {
console.info("after slide change");
$(window).trigger('resize');
});
</script>
<div class="row">
<a href="#" data-reveal-id="introModal" data-reveal class="button radius">Click For Modal</a>
</div>
<div id="introModal" class="reveal-modal medium" data-reveal>
<ul data-orbit>
<li>
<h2>Slide 1</h2>
<p>Some content in here.</p>
<img src="http://placekitten.com/400/300" />
</li>
<li>
<h2>Slide 2</h2>
<p>A description goes in here. This slide is larger and should expand.</p>
<img src="http://placekitten.com/400/600" />
</li>
</ul>
</div>
完美訣竅。謝謝。 :) – Carl