开发者

Absolutely bizarre appendTo problem in IE 8

The following code works great in almost everything (variable names changed):

this.$something.appendTo($container);

But in IE8, it was just... not doing the append. No error. No warning. Not a whimper. Through sheer luck, we found something that worked for no discernable reason:

$('<div class="hideme">ihat开发者_C百科eIE</div>').appendTo($('body')).remove();
this.$something.appendTo($container);

It's not a timing issue - there's no setTimeout involved and all the variables are either created right then or have been around for a while. And it works no matter what you append, no matter where you append it to, as long as you append SOMETHING to SOMETHING.

Why, why, why, why, why? I hate leaving this hack in my code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜