JavaScript, если ширина экрана
if ($(window).width() < 960) {
alert('Less than 960');
}
else {
alert('More than 960');
}
Alive Albatross
if ($(window).width() < 960) {
alert('Less than 960');
}
else {
alert('More than 960');
}
var w = window.innerWidth;
var h = window.innerHeight;
window.screen.width
//or just
screen.width
var win = window,
doc = document,
docElem = doc.documentElement,
body = doc.getElementsByTagName('body')[0],
x = win.innerWidth || docElem.clientWidth || body.clientWidth,
y = win.innerHeight|| docElem.clientHeight|| body.clientHeight;
alert(x + ' × ' + y);