I worked in a JavaScript file and my content worked with phrases. Now I want to change the style of these phrases. The first function (see swapFE function). I want to change the font style of the phrase node to normal. And change the color of the phrase node to the color value (155, 102, 102). The second function (see SwapEF). I want to change the font style to italics and the font color to black. How do i write? And am I writing it in my functions in JavaScript or are style changes applied directly in CSS or HTML?
These are the two functions that I want to apply to style changes:
function swapFE(e) {
var phrase = e.srcElement;
var parent = phrase.parentNode;
var idnum = parent.childNodes[0];
var phrasenum = parseInt(idnum.innerHTML)-1;
phrase.innerText = english[phrasenum];
}
function swapEF(e) {
var phrase = e.srcElement;
var parent = phrase.parentNode;
var idnum = parent.childNodes[0];
var phrasenum = parseInt(idnum.innerHTML)-1;
phrase.innerText = french[phrasenum];
If you could just give me a link where I can find these properties that would be nice.