I tell you, I'm working on a preloader that loads a div with every ajax request, I checked the jquery documentation and found the ajax event handler and implemented it, but I have a problem, the ajaxStart, just loads the gif in the first request ajax, the rest of requests do not load ... But beware! is only with the div, because I put them console.log with a message and there if you do all the ajax requests that I run, its corresponding message appears, and that is what drives me crazy !!! I attach the code. Thanks in advance.
<div class="gifdecarga" id="gifdecarga" style="display:none">
<img src="plantillas/images/sololetras.svg" alt="contableniifimagen" width="300px" style="position:absolute;" id="otraimagen">
<div class="preloader"> <p>Cargando Informacion...</p> </div>
<div class="div-bolita">
<img src="plantillas/images/logonormal.svg" alt="" id="bolita">
</div>
</div>
<script type="text/javascript">
$(document).ajaxStart(function(){$('#gifdecarga').show()});
$(document).ajaxStop(function(){$('#gifdecarga').hide()});
</script>'