Positioning an ajax loading image in the center of a mobile page.
The code snippet above is used to load database records via ajax by displaying a loading image in a Div element.
My inquiry is regarding how to ensure that this loading image appears at the center of the mobile page, possibly through CSS or another method. Thank you!
<script type="text/javascript">
$(document).ready(function() {
//setInterval(function(){
$('#loan').fadeIn(400).html('<img width="60" height="60" src="load.gif" align="absmiddle"> <span class="loading">Loading Data....Please Wait</span>');
$.ajax({
type: "POST",
url:'load.php',
data:"uname="+uname,
success:function(data){
$('#bring_data').html(data);
$('#load_spin').hide();
}
})
//}, 10000);
});
</script>
<div id="load_spin"></div>