move err style in to js file