开发者

jQuery toggle effects 'flashing entire page' in certain cases

I have a page that may have 10 or so editable 'panels' of information. To enable editing, I create a new DIV, load content via AJAX then toggle the divs (the one showing toggles off and the one I created with AJAX content is toggle to show)开发者_运维知识库.

This works great except for the last (bottom-most) one or two areas. When those toggle, I get a visual 'flash' on the page and the scroll bars jump a bit. It's not reloading the page nor is it adding a anchor link. In fact, it's using the exact same jQuery function as the other 'panels' on the page.

The 'fix', for now, is to add an empty spacer div to the bottom of the page. This fixes the weird 'flash' on the lower toggled panels but, obviously, leaves a weird empty space at the bottom of the page.

Has anyone ran into this issue and found a fix other than padding the height of the page?


The extra space at the bottom seems to be the pretty standard fix for that issue.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜