I wrote this code:
    <script>
function changeColor(newColor) {
 var currentLocation = window.location.href;
 if (window.location.pathname == "/communication-negotiation-and-conflict- management/")
       document.getElementById("color_var").style.backgroundColor = "lightblue";  
</script>
Course full:     <span style="color:white; display:inline-block;" id="color_var">63%       </span>
What I expect from the code is - function will change color of ID according the current url -so if the url is what I defineded (/communication-negotiation-and-conflict-management/) the ID (color_var) should change its background color.
I do not know why this is not working :-(
 
     
    