use className instead of setAttribute for setting alert class