Update js/main.js

Added preventDefault for click handlers.