I have a paragraph inside a div:
HTML:
<div id="header"><p>Header</p></div>
CSS:
#header p {
color: darkgray;
font-size: 15px;
When a button is clicked, the innerHTML Changes:
Javascript:
var header = document.getElementById('header')
header.innerHTML = "Changed"
However, the after innerHTML is changed, the text returns to its original attributes. I would like the text to keep its color (darkgray) and font size (15px).
Here is a JS Fiddle