有人可以告诉我我在哪里出错,我已经在Firefox和Chrome中测试过它,它现在可以正常工作在IE8中。setTimeOut IE8中的参数不起作用
setTimeout(function(it) {
x = $('.menuheader:first-child').position().left;
w = $('.menuheader:first-child').width();
p = x + w + 16;
$(it).next().css('left', p);
$(it).next().show();
}, 200, this);
也试过......
function showmenu(it){
x = $('.menuheader:first-child').position().left;
w = $('.menuheader:first-child').width();
p = x + w + 16;
$(it).next().css('left', p);
$(it).next().show();
}
window.setTimeout(function() {
showmenu(this)
}, 200);
在IE8任何错误? –
重复的http://stackoverflow.com/questions/7007364/settimeout-issue-in-ie8 – user568109
重复也没有为我工作。 –