jquery get screen size code example
Example 1: get the size of the browser jquery
$(window).height();
$(window).width();
Example 2: detecting screen width in jquery
var windowsize = $(window).width();
$(window).resize(function() {
var windowsize = $(window).width();
});
if (windowsize > 440) {
//if the window is greater than 440px wide then turn on jScrollPane..
$('#pane1').jScrollPane({
scrollbarWidth:15,
scrollbarMargin:52
});
}
Example 3: get page resolution jquery
$( window ).width()
Example 4: get screen resolution jquery
window.screen.width