📜  在 jquery 中检测屏幕宽度 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:19.687000             🧑  作者: Mango

代码示例1
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
    });
}