change collapseDiv as func(key, defarray);