开发者

divs display none ie6 and jquery toggle

I am currently using display none for the divs which I would like to use jquery toggle on. As usual something in ie6 is not the same compared to other browsers. First of all display none is adding white space and secondly its doing something weird. Imagine there is a word called elephant in div 1 and there is nothing in div 2 it is displaying the last few letters of elephant in div 2 for instance phant! When I removed display none every thing went fine is there any way around this so every thing is consistent in all browsers and I can keep using 开发者_开发百科toggle. May I add it is working with a few other divs 99% consistently just a slight layout jerk in ie6. What might the problem be?


Try hidding the element with jquery instead of css:

$('element').hide();

If that doesn't work try like this:

$('element').css({'position': 'absolute', 'visibility': 'hidden'});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜