Skip to content
Advertisement

How can I find the length of the table rows which have opacity 1 with style attribute?

I’m trying to find the length of the table rows which have opacity 1 applied by style attribute. The style="opacity: 1;" is applied dynamically so there could be 1 tr or a thousand trs with that way of styling applied and they could applied randomly. Not just the last two as shown in the demo below.

Here’s an example of how the TRs look:

JavaScript

I have tried the code below but getting this error:

JavaScript

Here’s the code:

JavaScript

What am I doing wrong here?

Advertisement

Answer

You try checking the opacity value:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement