Jump during slidown in jQuery 1.4.4

Here is little bit history of the issue, the slideDown needs to calculate the height of hidden element before animating 'slideDown' . Javascript cannot calculate height of element unless it is display:'something' not 'none'.
jQuery managed to have workarounds but landed in this bug


fixed it and landed in this smaller issue


now last day i experienced the jump again.
The solution jQuery found:
make position of elemnt absolute
make its visibility hidden
make its display normal.
now take the height.
revert back these changes.
this happens in small time that it doesnt cause prob;ems, else also no visible problem occurs.

now reason for jump:
during position:absolute the width of div depends on parent element with positioning.(unless width is defined fixed number) so if its a paragraph inside a column you are sliding down, the height calculated will be paragraph's height with width, width of body(or positioned elemnt before that).

sliding element Y has no width. Y inherits width from X. make X position relative;

Its hard to understand this unless you are good in positioning,display,visibility etc. just noting down if someone or me myself will find this useful later.

Related Posts by Categories

Widget by Hoctro | Jack Book

0 Responses: