我已将此功能添加到我的网站Jquery-Slide-Over,但是当我切换滑动[然后关闭]时,在我调整浏览器窗口大小时它仍然可见。我怎么阻止这个?感谢。
@media only screen and (min-width: 641.008px) {
.slide-over {
width: 90%;
right: -90%;
border-left: 1px solid gray;
}
.slide-over.left {
right: auto;
left: -90%;
border-left: none;
border-right: 1px solid gray;
}
}
@media only screen and (min-width: 1025.008px) {
.slide-over {
width: 80%;
right: -80%;
}
.slide-over.left {
right: auto;
left: -80%;
}
}
$('body').append(
"<div class='slide-over'>"
+ "<a href='#' data-slideover='close' class='close-x'><span class='icon-cross'></span></a>"
+ "</div>"
+ "<div class='overlay0' data-slideover='close'>"
+ "</div>"
);
答案 0 :(得分:1)
right: (settings.orientation == 'right' ? -(panelWidth*2) : "auto"),
left: (settings.orientation == 'left' ? -(panelWidth*2) : "auto")
想出来