Ok, im having slight problems with my jQuery login form now. Ive never bothered to learn all of jQuery, but i know some function well, e.g. $.post $.get, $.ajax.
But when making this, i came across a problem. When the user is logging in, i want it to appear to (for example) say checking username.... then 2-4 seconds later it says Success... etc. but how i have it, it just shows up like its always been there :/
Heres my Js code:
function submit_login() {
var username = $('#username').val();
var password = $('#password').val();
alert('User: '+username+' Pass: '+password+'.');
$('div.page').html('<big>Logging you in...</big>
[img=/images/loading.gif]
Checking username....');
if(username == '') {
$('div.page').append('<span style="color: red;">Error! No username</span>');
}
else {
$('div.page').append('<span style="color: green;">Success...</span>
Checking password....');
}
}
(The alert is for testing)
What ive tried so far:
$('div.page').append('<span style="color: green;">Success...</span>
Checking password....').fadeIn();
$('div.page').hide.append('<span style="color: green;">Success...</span>
Checking password....').fadeIn();
$('div.page').append('<span style="color: green;">Success...</span>
Checking password....').hide.fadeIn();
None worked, any help is apreciated (even if i cant spell it ;)) even if its wrong
Thanks Danny696