portfolio/src/main/webapp/script.js
// Function to insert new paragraph and add dynamic styling
Function to insert new paragraph and add dynamic styling
Function to insert new paragraph and add dynamic styling
function insertDiv(sentiment, sentimentContainer) {
    sentimentContainer.innerHTML = '<p> <span class= "style1"> Sentiment: </span> ' + '<span class= "style">' + sentiment + '</span>' + "</p>";
    var paragraph = document.getElementsByClassName("style1")[0];
    paragraph.setAttribute("style", "font-size: 13px;color: white;background: black; border-radius: 2px; padding: 2px; font-family: 'Monaco'");
}
function insertDiv ( sentiment , sentimentContainer ) { sentimentContainer . innerHTML = '<p> <span class= "style1"> Sentiment: </span> ' + '<span class= "style">' + sentiment + '</span>' + "</p>" ; var paragraph = document . getElementsByClassName ( "style1" ) [ 0 ] ; paragraph . setAttribute ( "style" , "font-size: 13px;color: white;background: black; border-radius: 2px; padding: 2px; font-family: 'Monaco'" ) ; }
Function to insert new paragraph and add dynamic styling
Function to insert new paragraph and add dynamic styling