I want to run the called function once every time the page is resized
$(window).on('resize load',function(){
if( $(this).width() < 768 ){
$('ul.menu-list').hide();
}else{
$('ul.menu-list').show();
}
});
$('.toggle-btn').click(function () {
$('ul.menu-list').slideToggle(300);
});