Gallery hover - play/pause

Hello,

I am attempting to simply have my slide deck gallery pause when hovered over, so visitors can read the content attached to each photo.
Could anyone share a clear solution with the code attached? I am learning more about coding everyday, but still have a long way to go :wink: Thank you.

Hi JWD286312312,

First of all, note that not all galleries have playable capabilities and therefore cannot be paused or resumed.
For example, a ‘Slide Deck (Pro Gallery)’ is not playable, but Slider(arrows) is.
you can check if the gallery supports it with the galleryCapabilities property.
If a gallery is playable, you can add an ‘onMouseIn’ event that runs a $w(“#gallery”).pause() function to pause when the mouse hovers on the gallery and an ‘onMouseOut’ event that runs a $w(“#gallery”).play() function to resume when the mouse leaves.

  • Lior