Incorporating a div named ADD, I aim to successfully load a second page within the current one using ajaxload. The challenge lies in displaying a div for 4 seconds before loading the second page. How can this be achieved? Following the wait period, the second page should then load seamlessly. Here's an outline of my code:
$(function() {
$('.add').click(function() {
$('.here').html('<span class="loading">LOADING...</span>');
$('.here').load('secondpage.html');
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<a href="javascript:void(0)" href="javascript "><div class="add">ADD Zone</div></a>
<div class="here" style="border:1px solid #000; width:100%; height:400px;">
</div>