Assuming the whole cell you want to hide has the class'.empty () 'I came up with this jQuery piece:
$(function(){ $(".empty").each(hideCellIfEmpty); }); function hideCellIfEmpty(){ var theCell = $(this); if(theCell.html().length == 0){ theCell.hide(); } }
aaaaand ... it works . :)
However, since hide() does not save space, you run this problem if you try to make a donut shape.
Fortunately, this is another question discussing this issue, and the answer is to use
css('visibility','hidden')
You can also find the witch in this script .
yoshi Aug 19 '12 at 3:20 2012-08-19 03:20
source share