Please, this function does not load the page. The return is correct, the code enters the if loop, but it does not load the page that should be the location. What can it be?
$('#btnLogin').click(function(){
var login = $('#inputEmail').val();
var senha = $('#inputPassword').val();
$.post('_class/login.php',{inputEmail: login, inputPassword: senha}, function(data){
console.log(data);
var response = $.trim(data);
if(data === 'OK'){
location.reload(true);
}else{
$('#myModal').modal('show');
}
});
});
Thank you