From b616ba730404f24a0031c7c3ad58ed9d16aee1a0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Sun, 6 Apr 2014 21:11:31 -0400 Subject: [PATCH] using preventDefault instead of return false --- public/src/forum/login.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/src/forum/login.js b/public/src/forum/login.js index de0defd54a..dd1ba7f22b 100644 --- a/public/src/forum/login.js +++ b/public/src/forum/login.js @@ -2,7 +2,9 @@ define(function() { var Login = {}; Login.init = function() { - $('#login').on('click', function() { + $('#login').on('click', function(e) { + e.preventDefault(); + var loginData = { 'username': $('#username').val(), 'password': $('#password').val(), @@ -43,13 +45,11 @@ define(function() { dataType: 'json', async: true }); - - return false; }); - $('#login-error-notify button').on('click', function() { + $('#login-error-notify button').on('click', function(e) { + e.preventDefault(); $('#login-error-notify').hide(); - return false; }); $('#content #username').focus();