Is Velo code only for desktops?

$w ( “#HeaderTransitionPoint” ). onViewportLeave (() => {
$w ( “#ScrollingHeaderStrip” ). show ( ‘fade’ );
$w ( “#DefaultHeaderStrip” ). hide ( ‘fade’ );
})
$w ( “#HeaderTransitionPoint” ). onViewportEnter (() => {
$w ( “#DefaultHeaderStrip” ). show ( ‘fade’ );
$w ( “#ScrollingHeaderStrip” ). hide ( ‘fade’ );
})

Works great on the desktop preview but not on the mobile preview. What am I missing?

Hello, your code should also work on the mobile version of your site. If you think you have encountered a bug, you can reach out to customer care and they will investigate.

I would try checking on a live site first as well just to make sure this isn’t an oddity only in preview mode. I would also test on your actual mobile device as well once you have a live url.