我希望这个幻灯片在切换时完全隐藏(调整浏览器窗口大小,它仍会显示)。Jquery-Slide-Over。我该怎么做?
@media only screen and (min-width: 1024px) {
.slide-over {
width: 80%;
right: -80%;
}
.slide-over.left {
right: auto;
left: -80%;
}
.close-x {
top: 12px;
right: 20px;
}
.slide-over .slideover-content {
padding: 2em 4em 1em;
}
}

// Close the slideout when clicking X or outside panel
$('*[data-slideover="close"]').click(function() {
var currentContent = $('.slide-over div.slideover-content');
closeSlider();
});
function closeSlider() {
$('.overlay').fadeOut(settings.animationSpeed);
// Remove the content inside the panel
panel.animate({
right: (settings.orientation == 'right' ? -panelWidth : "auto"),
left: (settings.orientation == 'left' ? -panelWidth : "auto")
}, settings.animationSpeed, function() {
$("body").css("overflow", "auto");
if ($.isFunction(settings.onClose)) {
settings.onClose.call(this);
}
});
}

由于
答案 0 :(得分:0)
right: (settings.orientation == 'right' ? -(panelWidth*2) : "auto"),
left: (settings.orientation == 'left' ? -(panelWidth*2) : "auto")
想出来