You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1023 B
32 lines
1023 B
|
|
jQuery(document).ready(function() {
|
|
|
|
$('.page-container form').submit(function(){
|
|
var username = $(this).find('.username').val();
|
|
var password = $(this).find('.password').val();
|
|
if(username == '') {
|
|
$(this).find('.error').fadeOut('fast', function(){
|
|
$(this).css('top', '27px');
|
|
});
|
|
$(this).find('.error').fadeIn('fast', function(){
|
|
$(this).parent().find('.username').focus();
|
|
});
|
|
return false;
|
|
}
|
|
|
|
if(password == '') {
|
|
$(this).find('.error').fadeOut('fast', function(){
|
|
$(this).css('top', '96px');
|
|
});
|
|
$(this).find('.error').fadeIn('fast', function(){
|
|
$(this).parent().find('.password').focus();
|
|
});
|
|
return false;
|
|
}
|
|
});
|
|
|
|
$('.page-container form .username, .page-container form .password').keyup(function(){
|
|
$(this).parent().find('.error').fadeOut('fast');
|
|
});
|
|
|
|
});
|