Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81728

check width of cells once table is loaded

$
0
0

I'm trying to measure the width of cells in fnDrawCallback .

docstable.DataTable().column(3).nodes().each(function (cell, i) {

console.log('$cell -----> ',cell);

}

the above code lets me know that i have located the correct cells

$(cell).addClass('test')

assures me that i am able to manipulate the DOM with this function

console.log('$cell -----> ',cell.offsetWidth);

returns a values of 0

i'm trying to find out which cells would be expanded beyond their default width. Those which would be are to have the css class added which contains overflow:ellipses. but without the measurements its impossible to do this calculation


Viewing all articles
Browse latest Browse all 81728

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>