Here is my code that redirects user to another page
$.ajax({
type: "POST",
url: "ajax/ajax-send-otp.php",
data: {
mynumber: mynumber,
userCountry: userCountry
},
success: function(data) {
if (data == 2) {
$("#otpVerifyDiv").slideDown(500);
window.location = 'free-listing-new.php';
} else {
alert(data);
}
}
});
Now On Another Page There is A Div-Id With #otpVerifyDiv
which is hidden. so i wants to show that div. so is it possible to show div after window location. ?
I don't need any parameters to be send with url for some reasons.and also do not need ay other js like jquery-cookies.js i tried
success: function(data) {
if (data == 2) {
//SHOW DIV
$("#otpVerifyDiv").slideDown(500);
//THAN REDIRECT
window.location = 'free-listing-new.php';
} else {
alert(data);
}
}
My HTML
<div class="form-group" id="otpVerifyDiv" align="center" style="display: none;">
//Some Contetnt Here
</div>
So is it possible ?
My Plan
is jquery provide any temporary storage or else so where i store data and send data from one page to another like cookies session.