http://morningharwood.com/works单击右下角的项目按钮会弹出一个非常基本的模式。在进行测试时,我注意到后退按钮不会删除模式。如何确保浏览器后退按钮将删除模态窗口?
enter = $(".enter")
createModal = () ->
$(".modal-bg").removeClass("animated fadeInUpBig").addClass "on animated fadeInUpBig"
$(enter).on "click", (event) ->
createModal()
HTML
<a class="enter" href="#">View Project<span></span></a>
SCSS
modal-bg{
background:#fff;
position:absolute;
bottom:0;
left:0;
right:0;
z-index: 101;
display:none;
visibility:hidden;
height:1px;
&.on
{
display: block !important;
visibility: visible !important;
height:100%;
top:0;
}
}