Is there a way to decrease the opacity of the background color for the body of the document while keeping the background color of the element with the id scene
at full opacity?
Currently, the opacity for the entire document is set to 0.5.
$(".artist").hover(function() {
$("body").stop().animate({
"opacity": 0.5
});
}, function() {
$("body").stop().animate({
"opacity": 1
});
});
body {
background: yellow;
}
#scene {
background: red;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div id="scene">
<div class="artist">Test me</div>
</div>