add function toggle_visibility in helper and delete js files that this function only