I use 3rd party tool and it’s generate numbers of div as below.
<div style="height:auto;" class="datagrid-cell datagrid-cell-c1-F1246"></div>
<div style="height:auto;" class="datagrid-cell datagrid-cell-c1-F1247">1</div>
<div style="height:auto;" class="datagrid-cell datagrid-cell-c1-F1248"></div>
<div style="height:auto;" class="datagrid-cell datagrid-cell-c1-F1249">1</div>
I like to use jquery to find all the div with the class =”datagrid-cell datagrid-cell-XX-XXXX” and with the content in the div =1 to change the css background color.
Note:XX-XXX can be any number which is not fixed length.
I tried with single cell but does not change the background color.
$('div').find('datagrid-cell datagrid-cell-c1-F1249').css('background-color', 'red');
How can I achieve this? Anyone can help?
You can try this:
or