Forum Discussion
SanduniFernando
6 years agoCommunity Member
Page background image not working
As per client requests, many of the courses that I developed had page background images. The below javascript worked pretty well for the purpose (thanks to Russell Killips).
$(".top-ui-bg").css("b...
OwenHolt
6 years agoSuper Hero
My solution, rewrite the code.
I used the following in the other example you sent me through LinkedIn:
//Code to change the html background to an image
document.body.style.backgroundImage = "url('cover.jpg')";
var tempID = document.querySelector("[id^='uniqueDom']");
tempID.setAttribute("fill-opacity", "0")
;
var tempID = document.querySelector("[id^='slide-bg']");
tempID.setAttribute("fill-opacity", "0");
To avoid most of this custom code, you can just use (or switch to) the classic player and in the player properties window set the player background components to 100% Transparency.
Then the only code you need is to set the background image to the page.
SanduniFernando
6 years agoCommunity Member
Thank you for your time and effort in finding this alternative solution, Owen.
Related Content
- 12 days ago
- 4 months ago
- 10 months ago