Call preventDefault() on the button's click event

This seems a lot cleaner than my first idea of removing href attribute if it exists and starts with a '#'.