Icon pop-up functionality | XM Community
Skip to main content
Question

Icon pop-up functionality

  • January 22, 2024
  • 3 replies
  • 74 views

Forum|alt.badge.img+1

I am trying to make it so that a little icon is present in the corner of specific question blocks, and when users click on it, an image pops up that they can close to return to the survey (so not in a new tab or page, but just opens as a smaller window on the survey). I have some javascript code and html code that I’ve been playing around with, and I’ve gotten the icon to appear and be clickable, but the window doesn’t pop up when clicked. I think maybe I’m putting code in the wrong place. Does anyone know how to achieve this? 

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • January 22, 2024

@CSchultz1117  - You should use a lightbox tool (e.g., Lightbox2, FancyBox, etc.) to do this.


Forum|alt.badge.img+1
  • Author
  • 1 reply
  • January 22, 2024

@CSchultz1117  - You should use a lightbox tool (e.g., Lightbox2, FancyBox, etc.) to do this.

For these to work, I’d have to have these libraries locally, correct? If so, this wouldn’t work if the survey will be taken from other devices I can’t download these libraries to. 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • January 22, 2024

@CSchultz1117  - You should use a lightbox tool (e.g., Lightbox2, FancyBox, etc.) to do this.

For these to work, I’d have to have these libraries locally, correct? If so, this wouldn’t work if the survey will be taken from other devices I can’t download these libraries to. 

You would load the library in the survey header from a cdn like jsdelivr.