I have a donate button on my page that I want to style. When I console.log it, this is what I get:
{id: “paypalButton1”
type: “$w.PayPalButton”
global: false
rendered: true}
I tried
$w(“#paypalButton1”).style.backgroundColor = “blue”;
and I tried
$w(“#paypalButton1”).html = <button backgroundColor = "color:blue"> ${$w("#paypalButton1").text}</button>
;
For the first option, the editor’s linter says “‘style’ does not exist on ‘#paypalButton1’”), and when I preview the page, the Wix console says, “Cannot set property ‘backgroundColor’ of undefined.” For the second option, the editor’s linter says “‘html’ does not exist on ‘#paypalButton1’”).
I already read the thread about styling elements and getting the ‘style does not exist’ error: https://www.wix.com/code/home/forum/community-discussion/w-style But it didn’t give any solutions that seem to work for such PayPal buttons…