I have the following HTML code:
<div id="detalles-modalE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Detalle de Pedido.-</h4>
</div>
<div class="modal-body edit-content"></div>
</div>
</div>
And the following JS code that calls the modal and sends the data through ajax:
$('#detalles-modalE').on('show.bs.modal', function(e) {
var $modal = $(this),
//-> aqui llamo a mis variables ->//
$.ajax({
cache: false,
type: 'POST',
url: 'miurl',
data: {misdatos},
success: function(data) {
$modal.find('.edit-content').html(data);
}
})
})
What I need is that while the ajax request is being made, a loading gif will be displayed, but inside the fashion window. I have read and searched for several examples, but none has worked. Does anyone have an idea of how to do that ?. I appreciate any help or guidance in this regard. Greetings.