From http://stackoverflow.com/questions/18805679/jquery-reset-form-after-using-before