How jquery listening browser window size depending on the size and output of different values

1 $(window).bind("load resize",function(){
2     document.documentElement.clientWidth >= 600 ? console.log("hello") : console.log("xiaoyu600")
3     });
4     //第二种
5     $(window).bind("load resize",function(){
6      if(document.documentElement.clientWidth >= 600) console.log("hello111")
7     });

 

Guess you like

Origin www.cnblogs.com/guoliping/p/11112546.html