set attr to all elements