I'm trying to disable the entire page by not allowing any further clicking anywhere on the page once already clicked. I'm aware there are so many sources with similar context, but didn't quite find any satisfying answer to my solution.
js:
$("#link").on( "click", function() {
$(this).attr('disabled','disabled');
$("div.container").css("opacity", 0.4);
$("#loading").css("display","block");
});
With the above code I'm just able to grey out the page, but I also want to be able to disable any clicks on the page when greyed out.
html:
<div class="container">
<a href="#">Link</a>
</div>
CSS:
#loading {
background: url(../images/loading.png);
display: none;
margin: auto;
}
Any ideas on this?