jQuery, hide a div without disturbing the rest of the page

前端 未结 6 512
难免孤独
难免孤独 2020-12-17 21:37

Consider the page as below (pseudocode)

&l
6条回答
  •  暖寄归人
    2020-12-17 22:22

    You could just put the header inside another and style that div to be the same height as the header. Then if jQuery removed the header it won't effect the page.

    Alternatively, as Lobo says, you could make it use visibility:hidden, but I imagine it will be hard to force jQuery not to set it display: none anyway.

提交回复
热议问题