function pm_clean_reaped() { $('td.node-from-594086').each( function( idx ) { // tbody > tr > this td var containing_ele = this.parentNode.parentNode; if( containing_ele ) { var reaped_td = $( "td.reaped", $(containing_ele) ) if( reaped_td.length == 0 ) { $(containing_ele).append( '