0

Close Pop Up Trigger

775 0 2
Posted   11 months ago

I'm trying to create an interaction where pressing the Close button on a pop-up triggers the previous element on the page to hide and a new element to show. Is it possible to achieve that (perhaps by leveraging JavaScript in the conditions)? 

 

Thanks! 

Comments

( 0 )

Answers  ( 2 )

0
avatar Paul Schneider   |    
Posted   11 months ago

I believe when you say "close" button in a pop up you are referrring to the out of the box close button. While that button is not configurable you could:

  1. Utilize the action that opens the pop up to also trigger the additional changes you are wanting. Basically tie a couple actions to that one action.
  2. You could create a custom option where you display something on the page, and then have a custom "close" button that hides that item and performs the other actions. 

Would either of those approaches work?

 

Comments

( 1 )
0
11 months ago     etschumacher     25   |   4  

Hi Paul, thanks for taking the time to reply.

Sadly, the answer is "no, neither of those approaches work".  We had started with option 1 and realized for example that where there are two items, activating selector #1 shows the popup (definition for the #1) concurrent with the selector #2, which could cause learners to associate the #2 selector with the #1 definition. The #2 selector should not be available until after the #1 definition is acknowledged (OK/Close).  Option 2 was not successful because we're bound by the real-estate of the row/column that holds the image/interaction and our customer very much likes the anchoredness of the popup. We've tried a custom option that was unwieldy, especially when it gets called 17 times in a single interactive experience. Maybe you have instructions for something more elegant? Or an API/jscript to increase popup event handling flexibility? TY!

0
avatar Paul Schneider   |    
Posted   11 months ago

Hmm then  you may try using our content API

Content API Syntax

Content API options

There is a content API option to close the window along with an option to set variables. You could add an HTML widget that has a button that closes the window and sets a variable when XYZ happens and then on the page have an action (hide/show) based on variable change.

If you want to got the extra mile, your theme could be set to hide teh default close button on the lightbox too.

 

Comments

( 0 )