add a class name to every node in a html fragment