Preloader on the backend wordpress

im trying to insert preloader on wordpress when user login, www.example.com/wp-admin ,when user enter above url and login to site,preloader is load with image which is exactly as i wanted but i want this preloader to stay at least for 5sec so that user could read the message in preloader, and next issues is that after login to dashboard, every dashboard menu i click its load preloader which i dont want,i want preloader to load for just once for 5sec when user login, i dont want preloader to load everytime when dashboard menu is clicked.(Hope i have made my issue clear)

add_action( 'admin_head', 'dashboard_preloader' );
function dashboard_preloader()
{
?>
<script type="text/javascript">

jQuery(window).load(function() { 
jQuery('#status').fadeOut(); 
jQuery('body').delay(40).css({'overflow':'visible'});
});
</script>


<div 
id="status" 
style="width: 100%; 
height: 780px;
position: absolute; 
z-index: 9999; 
background-position: 
center center; 
margin: 10px 0px 0px 0px; 
background-image: url(<?php echo get_stylesheet_directory_uri();?>/images/7.jpg); 
background-repeat: no-repeat; 
left: 0; 
background-size: cover;
top: 10px;">&nbsp;</div>
</div>
<?php
}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.