After successfully fetching data from the server through AJAX, I am redirecting to the same screen/URL. Is it possible to show/display a div after redirecting using jQuery?
$.ajax({
type: "POST",
url: action,
data: form_data,
success: function (response) {
if (response.status == 'undone') {
$('#paypal_email_error').html(response.errors.paypal_email);
$('.er_msg').show();
}
if (response.status == 'done') {
window.location = '/accounts/email/';
$('.show_this').show();
}
}
});
});
template.html
<div class="alert alert-error hide show_this">
<li>Saved Email successfully </li>
</div>