Why not create CSS class and here only remove or add this class? It is faster and more clearly.