Change submit button to be ajax using jQuery on forget password does not work I want to change submit button on forget password to be ajax to display the form as a pop up
I use this validation

jQuery('#user-pass').validate({
        rules:{
            "name":{
                required:true,
                email: true                 
                }
            },
            submitHandler: function(form){
                jQuery.ajax({
                      type: "POST",
                      url: jQuery("#basPath").val() +"ajax/check-login",
                      data:  jQuery("#user-pass").serialize(),
                      dataType:"html",
                      success: function(msg)
                      {
                        if(msg == "Invalid Email")
                        {
                            return false;
                        }


                        else
                        {
                            jQuery("#user-pass").submit(function() {
                              alert('Handler for .submit() called.');
                              return false;
                            });
                        }
                      }
                 });
            }               
        });


but no email is sending
Is this right or I have to make something else (I am using Drupal 7.12)
I found a solution I want to share with you
I use

jQuery(form).ajaxSubmit();


an remove this

jQuery("#user-pass").submit(function() {
                              alert('Handler for .submit() called.');
                              return false;
                            });


and it solve the problem I hope it can help you