2
Would there be some way to disable my click events body
. When I call a function I would like to disable the events in the processing which is a little time consuming and when it finishes activating again. I’ve used jQuery to add style pointer-events:none;
, but got a problem as my page is mounted dynamically in the middle of this function my events of hover
get bugged. Would have some CSS like clicks-events
or something similar 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-content class="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/>
post what you’ve done with css, html and javascript
– Leandro Angelo