ksz
03-19-2012, 04:38 AM
1) Script Title: Animated Collapsible DIV v2.4
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem: Can't restore the window height to its original height after collapsing.
Installed the code and works just fine. I have all DIVs collapsed as the default. I added inside one of the divs a link that once the mouse hovers over it, it displays a table (lets call it TABLE). I used the code of "Image w/ description tooltip" at http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm for displaying the TABLE
The problem occurs only when I expand a DIV and hover over the link, mentioned above, then I click to collapse the DIV. The DIV collapses but it doesn't restore the window's height to its original size (before expanding). So I end up with blank space at the bottom ofthe DIVs. This doesn't happen if I expand the DIV and collapse it with out hovering over the link.
After testing I found that once "tipcss.top" is set to a value (see function positionTip(evt)) and the value is within the view area, the code belongs to Animated Collapse doesn't restore the window's height to its original size, as it was before the DIV was expanded. I tracked the values of both "window.pageYOffset" and "document.body.scrollTop". Once the DIV is expanded their value increased according to how much is expanded. At Collapsing their values gets restored to the original as long as I don't hover over the link. If I did hover over the link, then their values don't get restored to their original value as it was before expanding, regardless of the height of the TABLE
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem: Can't restore the window height to its original height after collapsing.
Installed the code and works just fine. I have all DIVs collapsed as the default. I added inside one of the divs a link that once the mouse hovers over it, it displays a table (lets call it TABLE). I used the code of "Image w/ description tooltip" at http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm for displaying the TABLE
The problem occurs only when I expand a DIV and hover over the link, mentioned above, then I click to collapse the DIV. The DIV collapses but it doesn't restore the window's height to its original size (before expanding). So I end up with blank space at the bottom ofthe DIVs. This doesn't happen if I expand the DIV and collapse it with out hovering over the link.
After testing I found that once "tipcss.top" is set to a value (see function positionTip(evt)) and the value is within the view area, the code belongs to Animated Collapse doesn't restore the window's height to its original size, as it was before the DIV was expanded. I tracked the values of both "window.pageYOffset" and "document.body.scrollTop". Once the DIV is expanded their value increased according to how much is expanded. At Collapsing their values gets restored to the original as long as I don't hover over the link. If I did hover over the link, then their values don't get restored to their original value as it was before expanding, regardless of the height of the TABLE