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.
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)";