No errors, I get the alert, but the header value doesn’t change. Nor do any of the other text values. Labels, Textareas, etc work as expected. What am I missing?
The Bootstrap controls are made up of regular HTML elements. If you right click on one in Chrome and select Inspect, you can see the HTML and CSS a control is built with.
Notice that I’m setting the .innerHTML property above? That means the string can be any valid HTML. You can include styling info directly in the string.
Alternatively, you can do this with a bit of help from a jQuery function:
$("#Card1_header).css("background", "yellow")
You’re probably close to figuring out your image question by now:
Oh, the inspect, that was the missing “link”. I see the ID of the image in the card was Card1_image and the src is the attribute name, so it becomes the property name of the image in the card, or Card1_image.src. (Guess I’m going to brush up on DOM some more.)
However, I also see something in the inspect that looks unusual.
<div id="Card1_text" class="card-text " style="" data-i18n="This is the text of the Card.">This is the text of the Card.</div>
the data-i18n attribute. Is this used to go back to the default value?