Save expanded elements in cookies.