Is there anyway to make forgot password form with ajax ?
Currently page is getting refreshed after submitting that form but I don;t want that.So is there any way to achieve it ?
I tried something like this without any success.
var $forget_password_form = $("#piereg_lostpasswordform");
//New function created
$("#piereg_lostpasswordform #wp-submit").click(function(event){
$.ajax( {
type: "POST",
url: $forget_password_form.attr( 'action' ),
data: $forget_password_form.serialize(),
success: function( response ) {
console.log( response );
}
} );
});