Hide TD into DIV Using jQuery

后端 未结 5 601
时光说笑
时光说笑 2021-01-21 12:05

I\'m Trying to Hide an div with all TD But Only hide the text into the div and no hide the TD tags somebody know how to fix this? My Code is:

jQuery Code:



        
5条回答
  •  被撕碎了的回忆
    2021-01-21 12:32

    This is actually a cross-browser issue I have run into before - some browsers [IE] will apply the opacity css property (which is how hide() works) to the object it is called on and all it's content, and some [FF] will apply it to the container only and the content will still be visible.

    The only solution I ever managed to find that worked everywhere was to call hide() on both the container and all the elements it contains. This is overkill in browsers that have already hidden it but it does work.

    I have not tested this for some time so my statements about which browsers will/will not support this may no longer be true.

提交回复
热议问题