I have a div, visitors-main-panel, that shows search results. I have a set of filters above. I would like to show a semi transparent panel over the top of the search results whilst I am fetching the new results via ajax.
$('#visitors-main-panel:after').hide();
.visitors-main-panel {
position: relative;
}
.visitors-main-panel:after {
content: " ";
z-index: 10;
display: block;
position: absolute;
height: 100%;
top: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.3);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="col-sm-9 visitors-main-panel">
Initial search results
</div>
But this doesn't seem to work.