JavaScript: Toogle text generalized