Given the above, I might extend that to rewrite this listener so that menuOffset is declared and given its value within the handler, making use of the cached #sub-head object.