I am trying to create a login form. The issue is it will only execute the action when Someone hits the submit button, Im trying to add the functionality if the user has clicked the input
field then hits enter (just like it would without jquery and normal php) it will also execute the same code to check for errors or goto a post veriable that I am testing it with.
Heres the full JQuery code which goes to A PHP $_POST page todo testing..
$(document).ready(function() {
$('#submit').click(function() {
var user_login = $('#user_login').val();
var password = $('#pass_login').val();
$.post('ajax/check.php', {user_login: user_login, password: password}, function(data) {
$('#content').html(data);
} );
});