add scroll, hide panel function