Can you change this to e.preventDefault()? This is a more robust way to ensure the default functionality is disabled. Also make sure to put it before line 5.