【Jquery】判断宽度跳转

$(window).resize(function(){
    var wWidth = screen.width;
    if( wWidth < 788 ){
        window.location.href="http://www.baibu.com"
    }
})

var wWidth = screen.width;
if( wWidth < 768 ){
    window.location.href="http://m.web72-38318.59.xiniuyun.com"
}

 

posted @ 2019-06-17 20:45  瀚海浪亭  阅读(188)  评论(0编辑  收藏  举报