I am faced with a table structured like this:
<table id="orders">
<tr>
<td>05/06/2005</td>
<td>3216549</td>
<td>description</td>
<td>2.000,00</td>
<td>100</td>
<td>20,00</td>
<td><div id="state" class="state-c"> </div></td>
<td><a href="modify.php?id=222"><span class="bt-edit">EDIT</span></a></td>
</tr>
<table>
The section
<div id="state" class="state-c"> </div>
displays different statuses such as "Approved", "Rejected", etc, which are generated using CSS:
.state-c:before {
content: "Confirmed";
}
However, I am encountering difficulty in retrieving the text value of these table cells. While I can successfully extract text from other cells using the .text()
method, it does not work for the CSS-generated text "Confirmed". I have attempted methods like getGeneratedStyle
, .value
, and spent hours researching solutions, but to no avail.
Therefore, my query is: How can I retrieve the dynamically generated text within the
<div id="state" class="state-c"> </div>
which appears empty in the code?