A scrollspy implementation based on custom events.