add the anchored class

adds the anchored class when an element has an anchor