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')'? –