-
display the layer
i have a display some content using the "<Div>" element... the content with in the layer will made visible or hidden based on the click event on a link in the page... When the "Div" is set to hidden mode, still "Div" occupies the space on the page where it will be displayed.. but i dont want this to happen...
All i want is when the "div" is set to "Visible" mode, it pushes the contents below the "DIV" downward and make it self visible.. and when "div" is set to "hidden" mode, it vanishes from screen and wraps up the content below "div"...
Ex:
i have content as shown below, "Child_row1" and "Child_row2" are content of a "Div" and it will be visible only when "Row2" is clicked and will be hidden when "Row2" is again clicked....
-------------------------------------------
Row1
Row2
Child_row1
Child_row2
Row3
-------------------------------------------
please help me how should i be doing this.......
-
Re: display the layer
Instead of using the visibility, use display.
Code:
document.getElementById('element_id').style.display = 'none'; // or block to show