I am dealing with a situation where I have 2 pages. The first page contains a div called 'ajaxicall', which loads another page inside it.
The challenge I am facing is figuring out how to close the second page when I click on the "close" button within that page, and then display the containers of my first div again. Any insights on this would be greatly appreciated. Thank you.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div class="ajaxicall">
<span id="addtobasketspan">First Div</span>
<img src="images/shopping-cart-xxl.png"/>
</div>
<script>
$("#addtobasketspan").click(function(e) {
$.ajax({
url:'secondpage.html',
type:'get',
data: 'lid=1',
success:function(data){
$("ajaxicall").load('secondpage`enter code here`.html');
}
});
});
</script>
</body>
</html>