If input has that class, add a class to it's label

If input has that class, add a class to it's label

Hi guys,

Could you please explain me why this code is not working:


Thanks