Im using scotch panels to make an off canvas menu. I would like to change the width of the panel from 70% to 100% on mobile only. Here is the code i'm using:
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
});
});
I think I can use the below code but i'm not sure how
if (screen.width >= 768) {
// make width of panel 100%
}
Can anyone help me out?
Thanks!