onBeforeHeaderRowCellDestroy event is triggered after $headerRowL.empty() and $headerRowR.empty() calls. jQuery empty() method removes all child nodes, data and event handlers from the child elements so when onBeforeHeaderRowCellDestroy event is triggered there is nothing left to work with. It should be:
onBeforeHeaderRowCellDestroy event is triggered after $headerRowL.empty() and $headerRowR.empty() calls. jQuery empty() method removes all child nodes, data and event handlers from the child elements so when onBeforeHeaderRowCellDestroy event is triggered there is nothing left to work with. It should be: