Forum Discussion
STORYLINE LIGHTBOX BACKGROUND (MODERN PLAYER) NOT TRANSPARENT
I have a lightbox where I needed to make the background transparent, hide the lightbox wrapper, and also adjust overlay color/transparency around it (that I used for a fading effect).
I put these in a JavaScript trigger on the lightbox slide master layout. You don't need all of these, you can play around each of them and see the result. Using this was easier than editing the output html every time. It's important that these are on slides used for lightbox only because it assumes you have these elements on the page. I also added a trigger on the masterpage for Escape. When the user presses Escape on a lightbox, it closes. Much friendlier than mousing or tabbing to the X.
document.getElementsByClassName('lightBoxSlide')[0].style.backgroundColor = "transparent"
document.getElementsByClassName('visible-overlay')[0].style.backgroundColor = "rgba(255, 255, 255, 1)"
document.getElementById('light-box-wrapper').style.background="none"
Thanks for this solution Zsolt. It worked perfectly for my needs. :-)
Related Content
- 9 months ago
- 4 months ago
- 9 months ago