这让我困惑了几个小时。为什么在 IE8 中测试时出现“无效参数”错误?
function resizeContainer() {
wHeight = window.innerHeight;
$('.container').each(function () {
$(this).animate({
height: wHeight
}, 400);
});
$('.content').each(function () {
wHeight = window.innerHeight;
fullPad = wHeight - $(this).height();
if (wHeight < 750) {
cropFactor = 1.7;
}
else {
cropFactor = 2;
}
$(this).animate({
paddingTop: fullPad / cropFactor
});
});
}
我得到的确切错误是:
无效的论点。jquery.js,第 8826 行字符 5