Adds logic to add a class to each pr element.