$(function () {
$(window).resize(function () {
if ($(window).width() > 1100) {
$("#logo").on('mouseenter.anim', function () {
$(this).stop(true).animate({
paddingTop: "0px",
paddingBottom: "20px"
}, 200);
}).on('mouseleave.anim', function () {
$(this).stop(true).animate({
paddingTop: "20px",
paddingBottom: "0"
}, 200);
});
} else {
$("#logo").off('mouseenter.anim mouseleave.anim');
}
}).resize();
});
How can I replace the window width in this script to use the viewport width instead so that it matches with my CSS media query?