portfolio/src/main/webapp/script.js
// Function to add text sentiment and  dynamic styling to it
Function to add text sentiment and  dynamic styling to it
Function to add text sentiment and dynamic styling to it
function changestyle(num) {
    var elementChange = document.getElementsByClassName("style")[0];
    if (num == 1) {
        elementChange.setAttribute("style", "background: #E53C06;");
    } else if (num == 2) {
        elementChange.setAttribute("style", "background: #E59E06;");
    } else {
        elementChange.setAttribute("style", "background: #429F10;");
    }
}
function changestyle ( num ) { var elementChange = document . getElementsByClassName ( "style" ) [ 0 ] ; if ( num == 1 ) { elementChange . setAttribute ( "style" , "background: #E53C06;" ) ; } else if ( num == 2 ) { elementChange . setAttribute ( "style" , "background: #E59E06;" ) ; } else { elementChange . setAttribute ( "style" , "background: #429F10;" ) ; } }
Function to add text sentiment and  dynamic styling to it
Function to add text sentiment and dynamic styling to it