I have an Ajax call like this:
$(document).on('submit', '#formPropiedades', function(event) {
event.preventDefault();
var content = {}, url = "http://www.xxxxyzzz.com/xxx/yyy/web/ajax.php";
$("#dialog1").dialog("open");
var posting = $.post(url, {
im_core: 'saveAllAdds',
idFeed: <?php echo $_POST['idFeed'] ?>,
pais: <?php echo $pais1?>
}).done(function(data) {
if (data == 1)
$(".overlay-bg1").html("Suces....");
else
$(".overlay-bg1").html(data);
});
<?php } ?>
});
And my HTML looks like this:
<div id="dialog1" title="Attention!!" style="width:60%">
<div class="overlay-bg1">Saving the Adds....</div>
</div>
The code for opening the jQuery UI Dialogue is like this
$(function () {
$("#dialog1").dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "",
duration: 1000
},
});
});
I want to Show a timer in the POPUP which should start when the Ajax call is done and stop when I get the response. It should look like a Stop watch