1
如果有某種方式可能,有人可以指向正確的方向。如何使用散列(#)打開基礎顯示模式
我有一封電子郵件我想發送給用戶一個指向特定頁面的鏈接。我在該頁面上有模態,並且我希望頁面根據網址以特定模式打開。 例子:
domain.com/story/#story1
打開與打開的頁面顯示模式與ID #story1
我真的很感激,如果有人可以幫助。
我設法有模態窗口打開,同時通過
("#Modal8").foundation('reveal', 'open');
有人瀏覽頁面建議我用
<script>
var hash = window.location.hash;
if (hash === "#story8") {
$('#Modal8').reveal({
animation: 'fadeAndPop', //fade, fadeAndPop, none
animationspeed: 300, //how fast animtions are
closeonbackgroundclick: true, //if you click background will modal close?
dismissmodalclass: 'close-reveal-modal' //element that will close an open modal
}); //You can use same modal or different modal to show success message
}
</script>
我曾嘗試沒有成功。
什麼是'ef('#Modal8')'? –