0
使用scotch panels創建畫布菜單。我只想在手機上將面板的寬度從70%改爲100%。下面是我使用的代碼:更改手機上jquery關閉畫布面板的寬度
jQuery(document).ready(function($){
var panelExample = $('#sidecart').scotchPanel({
containerSelector: 'body',
direction: 'left',
duration: 300,
transition: 'ease',
clickSelector: '.toggle-sidecart',
distanceX: '70%', // this sets the width
enableEscapeKey: true
});
});
我想我可以使用下面的代碼,但我不知道
if (screen.width >= 768) {
// make width of panel 100%
}
如何誰能幫助我嗎?
謝謝!