td colspan does not work while using jquery show/hide()

后端 未结 9 513
走了就别回头了
走了就别回头了 2021-01-13 16:14

I have a table of content

First Name Last Name Des
相关标签:
9条回答
  • 2021-01-13 16:51

    This is the problem with 'display:block'

    Please refer the below link http://thedesignspace.net/MT2archives/000376.html#.UUrg3FfCd1u

    If you are hiding tr, then use 'display:table-row' instead of 'display:block' to display that tr,

    If you are hiding td, then use 'display:table-cell' instead of 'display:block' to display that td

    0 讨论(0)
  • 2021-01-13 16:55

    Sorry It was my mistake. style tag should be place into TR not in TD

      <tr style="display:none"><td colspan="3">Description goes for 1st row</td></tr>
      <tr style="display:none"><td colspan="3">Description goes for 2nd row</td></tr>
    
    0 讨论(0)
  • 2021-01-13 16:55

    I had issues with jQuery and showing and hiding / sliding table rows in the past, in the end i had to get jQuery to wrap the selected td in a div and then show / hide that, not nice i know but on a tight deadline it worked.

    Just something to keep in mind if you have similar issues with the animation.

    0 讨论(0)
提交回复
热议问题