fixed non retracting menu by adding function into a .scroll callback function