Strip viewportenter

I’m trying to use the viewPortEnter event handler to change the formatting of a menu item so that basically even when scrolling through a page a relevant menu item will highlight. and i have it working except it highlights the menu item no matter how small a part of the strip is on the screen. is is possible to have it only fire the event when the whole strip is visible. The code I have right now is:

export function ucTeamsIntStrip_viewportEnter ( event ) {
$w ( “#PinTIBtn” ). style . backgroundColor = “#689ADE” ;
$w ( “#PinTIBtn” ). style . foregroundColor = “#ffffff
}

export function ucTeamsIntStrip_viewportLeave ( event ) {
$w ( “#PinTIBtn” ). style . backgroundColor = “#E5EBFA” ;
$w ( “#PinTIBtn” ). style . foregroundColor = “#0069FF
}

You can add anchors (which are invisible elements with zero width), and set the viewport event listeners for the anchors instead of the the strips (once the anchor get into viewport do X etc…).

Thank you, think I was seriously overthinking that, simple and effective solution