js function for changing style -> color