Add and remove the attribute from the correct slot.