Forum Discussion
Is there any way to change the color of the Lightbox Close (X) button in the new modern dark player?
Hi David,
I decided to try manipulating the close button with javascript.
On the lightbox slide, there is an execute javascript trigger on timeline start.
var x = document.getElementsByClassName("lightbox-close-btn")[0];
x.style.backgroundColor = "#ff0000";
x.style.width = "40px";
x.style.height = "40px";
x.style.padding = "10px";
x.style.margin = "10px";
Here is a sample project for you to look at.
- ClintClarkson-c6 years agoCommunity Member
This is awesome, Russell! Thanks so much for sharing it.
Is the a line of JS that can be added to increase the size of the "X" itself (say to 200%)?
- RussellKillips-6 years agoCommunity Member
Hello Clint,
You could try:
var x = document.getElementsByClassName("lightbox-close-btn")[0];
x.style.transform = "scale(2.0)"; - RussellKillips-6 years agoCommunity Member
var x = document.getElementsByClassName("lightbox-close-btn")[0];
x.style.backgroundColor = "#ff0000";
x.style.width = "40px";
x.style.height = "40px";
x.style.padding = "10px";
x.style.margin = "20px";
x.style.transform = "scale(2.0)";
- DavidSchwartz-f6 years agoCommunity Member
Great stuff Russell. Was looking for a way to change that color, as I have no red objects anywhere in a series of modules I'm developing.
Thanks!
- LucianaBarbieri6 years agoCommunity Member
I'm trying to apply it to my file and it's not working. in fact I tried it in the one shared and it doesn't work.
Did anyone else have the same issue?
- LinWong5 years agoCommunity Member
Hi Russell, have you ever tried customising the lightbox size on Storyline using javascript? Thank you!
- AnnaTyszko4 years agoCommunity Member
Hi Russell,
I'm wondering if you maybe know how to change the border of the Lightbox to make it thinner (1-2px thick) or even hide it completely?
I'm using classic player.