ImageCompare stack inside LimeLight modal

Seems to me like another question for @TAV, but everybody is welcomed.

I have a page with the ImageCompare (S4S) stack inside LimeLight (BWD) modal window. ImageCompare loads fine if there is no cache existing for that page. But on each consecutive opening of that page, ImageCompare does not load and it does not use the existing cache. BTW, I tried the ‘Lazy Preload’ checked and unchecked in LL. Doesn’t make a difference. But it only takes a slight resizing of browser window for IC to load as expected. (???)

I know the issue could be avoided by not placing ImageCompare inside a modal window, but a whole page is designed based on LL modal.

At first, I thought busting the cache should be the thing. But then, @willwood got me on track, saying this:

“way to accomplish what you want is to attach a callback event handler to your LL. So whenever LL opens or does something, the code for IC is re-initiated. This by-passes the cache and side-steps a whole host of other potential problems you have not anticipated occurring yet. That is definitely the best way to do it safely and efficiently.”

However true that may be, I got no idea how to implement this in LL. I’m sure I can count on an enlightenment from the forum.

Have a great New Year’s Eve, everyone…

Limelight fires events on the window when it opens (amongst other things). You can show these in edit mode by checking the Show trigger classes in edit mode setting - these events can then be used to run whatever code ImageCompare needs to re-initialise itself.