I am making an ajax request that works perfectly on the Desktop, however when I test on android it does not work, if anyone can help me
jQuery(document).ready(function($){
$("#loginform").on('submit', function() {
var input_data = $('#loginform').serialize();
$.ajax({
type: "POST",
url: "<?php echo site_url('wp-login.php','login_post'); ?>",
data: input_data,
success: function(msg) {
var reg1 = /login_error/g;
if (reg1.test(msg)) {
$('#message').html("Usuário ou senha incorretos.");
}else {
// login success. redirect users to some page.
//$(location).attr('href', '/my-account/');
//or reload the same page
if($('#user_pass').val() != '' && $('#user_login').val() != '') {
location.reload();
} else {
$('#message').html("Usuário ou senha não preenchidos!");
$('#message').fadeIn();
}
}
}
});
return false;
});
});