Can someone help me troubleshoot why my code is not entering the on click function as expected? What am I missing here?
let allDivsOnTheRightPane = rightPane.contents().find(".x-panel-body-noheader > div");
//adjust height of expanded divs after adding cases tab
allDivsOnTheRightPane.not(casesTabHTML).each(function(){
let self = this;
let header = self.childNodes[0];
console.log(header); // element located correctly
$(header).on( "click", function () { // debugger not hitting this and skipping to end
let currentDiv = $(this).get(0);
$(this).arrive(".x-panel-body", arriveOptions, function () {
let xPanel = currentDiv.getElementsByTagName("div")[2];
let xPanelSub = xPanel.getElementsByTagName("div")[0];
let xPanelSubSub = xPanelSub.getElementsByTagName("div")[0];
let currentHeight = $(xPanelSub).height();
let newHeight = (currentHeight - 30) + "px";
$(xPanelSub).css("height", newHeight);
$(xPanelSubSub).css("height", newHeight);
});
});
});