add one click and show hide footer
cleanup and added more code for single click