$(window).resize(function() {
location.reload();
});
개발하다 보면 화면 크기에 맞게 전환(반응형)하고 싶지만
script에서 일부러 그렇게 하면 스마트폰에서 스크롤할 때마다 리로딩이 시작된다.
($(window).resize(function()) {
if ($(window).width() ! == currentWidth) {
currentWidth = $(window).width();
xxxxxx;
}
}); });
width를 고정해도 안 되니 정말 함정!