Do action on specific width/ height

jQuery(document).ready(function(){

if(jQuery(window).width()<900){

}

});

jQuery(window).resize(function(){

if(jQuery(window).width()<900){

}

});

Anuncios

Window and document width

Width of the browser:

$(window).width();

 

Width of the document:

$(document).width();