I'm trying to come with a way to remove functionality on a tag. I'm used to jquery and the code would be something like this.
$(document).on("click",".goto-messages:not(done)", function(e){...
...$(".profile-messages").addClass("done");
I'm trying to achieve the same thing using javascript but I'm failing at adding class attribut. I'm also not sure how to add the argument to not fire a function e.g. ":not(done)"
            document.getElementsByTagName("td").onclick = function(){
                this.style.background = blue;
                this.class
            }
How do I achieve this result in javascript? I want to remove the functionality of the element that is clicked.
Also is the line "this.style.background = blue;" correct?
 
     
     
    