リサイズサイズにあわせて高さを調整
//リサイズ時
var timer = false;
var mh = $('#headerIn').height();
var sec = ".sp_index #contents_menu01,.sp_index #contents_menu02,.sp_index #contents_menu03,.sp_index #contents_menu04";
console.log(sec);
$('body').css({"padding-top":mh});
$(sec).css({"padding-top":mh + 40,"margin-top":-mh-15});
$(window).resize(function() {
if (timer !== false) {
clearTimeout(timer);
}
timer = setTimeout(function() {
mh = 0
mh = $('#headerIn').height();
$('body').css({"padding-top":mh});
$(sec).css({"padding-top":mh + 40,"margin-top":-mh-15});
}, 0);
});
[jQuery] ウインドウのリサイズ操作が終わった時にだけ処理を実行する
http://kadoppe.com/archives/2012/02/jquery-window-resize-event.html