jquery check if screen size

JavaScript
if ($(window).width() < 960) {
   alert('Less than 960');
}
else {
   alert('More than 960');
}
Source

Also in JavaScript: