jquery if screen size

JavaScript
if ($(window).width() < 960) {
   alert('Less than 960');
}
else {
   alert('More than 960');
}$(document).ready(function() {
    if($(window).width() >= 1024) {
        $('a.expand').click();
    }
});

Source

Also in JavaScript: