I'd have some way to disable the click events of my body
. When I call a function I would like to disable the events in the processing that is a bit time consuming and when I finish activating again. I've already used jQuery to add the pointer-events:none;
style, but got a problem since my page is dynamically mounted in the middle of this function and my events from hover
are bugged. Is there any CSS type clicks-events
or something like that using jQuery?
function getProspect() {
$('body').addClass('desabilitaEventos');
$('#loadingBar').fadeIn(1000);
//...
$('#loadingBar').fadeOut();
$('body').removeClass('desabilitaEventos');
}
.desabilitaEventos{
pointer-events: none;
cursor: default;
}
#loadingBar{
position: fixed;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><md-contentclass="md-padding backgroud-templates" style="min-height: 700px;">
<div id="loadingBar" class="lds-css ng-scope" style="display:none;">
<div style="width:100%;height:100%" class="lds-eclipse">
<div></div>
</div>
</div>
<md-content/>