#divLoading
{
display : none;
}
#divLoading.show
{
display : block;
position : fixed;
z-index: 100;
opacity : 0.4;
background: #666 no-repeat center;
left : 0;
bottom : 0;
right : 0;
top : 0;
}
#loadinggif.show
{
left : 50%;
top : 50%;
position : absolute;
z-index : 101;
margin-left : -16px;
margin-top : -16px;
}
$('div#divLoading').addClass('show');
$.ajax({
url: 'http://api.ipify.org/?format=json',
type:"GET",
success: function (data) {
mesaj += "<br/><br/><br/><b>"+"İp Adres = </b>" + data.ip + "";
$.ajax({
url: 'http://www.turkuazdestek.com/atolyeNotlariEmailTest/sendEmail.php',
type: "POST",
data: {mesaj: mesaj},
success: function (response) {
$('div#divLoading').removeClass('show');
alert(response);
}
});
}
});
<div id="divLoading" class="col-md-12 text-center">
<div class='uil-ripple-css center-block' id="loading" style='transform:scale(0.7);'><div></div><div></div></div>
</div>