$(function(){ $(window).resize(Nchwid); function Nchwid() { var wid=document.documentElement.clientWidth; console.log(wid); }})