and when a user clicks on it I want to be able to change the “link” class to a different class. However, I don’t want to add anything to the actual link html. Is it possible to do this using javascript without modifying the original link code?
To do it with javascript requires having some way to target the link. Do you have a sample test page from which an appropriate solution can be crafted for you?