简体   繁体   中英

Display a specific row table based on row content

so i need to display some specific rows of my table based on the row content with JS

this is the example : 在此输入图像描述

I need to display the tr where the td has an element i class fa fa-heart Is it possible ?

To display the className of the i element in the td :

$('#myTable tr:eq(1) td:eq(1)')[0].children[0].className

For checking if it is the right value you need to loop through all the table elements

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM