jQuery Partial Selectors

前端 未结 3 1548
栀梦
栀梦 2020-12-10 02:09

I have a number of tables, which have nested tables. I using jQuery to hide some of the table cells as a number are empty or the contents irrelevant.

I use jQuery to

3条回答
  •  天命终不由人
    2020-12-10 02:19

    The [attribute$="value"] selector will let you match attributes that end with a particular value. Note that using show() instead of changing the CSS directly will retain the display characteristics of the element you are revealing. If you really want to force them to display inline, you can revert it back to the css method with display: inline

     $('td[class$="Node"]').show();
    

提交回复
热议问题