jQuery Partial Selectors

前端 未结 3 1539
栀梦
栀梦 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:46

    This will select any tds with Node somewhere in their class name.

    $('td[class*=Node]').css('display','inline');
    

    This will select any tds with Node at the end of their class name.

    $('td[class$=Node]').css('display','inline');
    

    Bear in mind that .show() does roughly the same thing as .css('display','inline');

提交回复
热议问题