I am trying to check the viewport size, and then apply different styles based on whether the viewport size is between 768px - 992px, using an if and else statement. However, what I've got so far isn't working.
Here is my code...
$(document).ready(function() {
var windowSize = $(window).width();
function checkwindowSize() {
if(windowSize > 768 && windowSize < 992) {
$('#show-menu').css('visibility', 'hidden', function() {
$('#slide-menu-container').css('visibility', 'visible');
});
}
else {
$('#show-menu').css('visibility', 'visible', function() {
$('#slide-menu-container').css('visibility', 'hidden');
});
}
});
});
Thank you!