I\'ve been using jquery 1.6 with no problem. Today I switched to jquery 1.8 and suddenly I am getting this error when trying to submit a form:
TypeError: e[h
When we use a submit type element in a form, This element will be set as Submit property of the form. So one could not call the submit() function with other element of form.
There are two ways to do this. first one is just remove the line as given in first reply.
Or Use $("#submit").trigger("click"); instead of $("#login").submit();. and it will submit the form on pressing enter key word too.