Untitled
unknown
javascript
3 years ago
833 B
7
Indexable
drawCallback: function () {
let api = this.api();
let rowCount = api.rows({ page: 'current' }).count();
if (
!$('.trafficSourcesRight tbody tr td:first-child').hasClass(
'dataTables_empty'
)
) {
for (
let i = 0;
i < api.page.len() - (rowCount === 0 ? 1 : rowCount);
i++
) {
$('.trafficSourcesRight tbody').append(
$('
<tr style="position: relative"><td> </td><td></td><td></td>
<span class="progressBar"></span>
</tr>')
);
}
}
},
function setProgressBar() {
tableData.forEach(element => {
$( ".progressBar:contains(element.countryName)" ).css( 'width', element.percentValue )
});
}Editor is loading...