You can use the direction
parameter that is passed to the waypoint function. Its value will be "down" or "up" depending on which direction the user is scrolling when they cross the waypoint:
$('div.page.event div.main-content').waypoint(function(direction) {
if (direction === 'down') {
$('button.scrollToTop').fadeIn(200);
}
else {
$('button.scrollToTop').fadeOut(200);
}
});