Currently, I have a div that contains several child divs. My goal is to disable the parent div and all of its children, showing them in gray color. I initially tried using the CSS property opacity
, but unfortunately, the background color didn't change as desired. Can someone please assist me in achieving this effect?
My initial attempt involved:
<div id="rtcontainer" load-complete data-ng-cloak=""
style="left: 0px; top: 4px; width: 315px; height: auto; float: left; position: relative;">
<div><table><thead><tr><th></th></tr></thead></table></div>
<div><table></table></div>
</div>
I attempted the following style:
<style>
.disabledbutton {
pointer-events: none;
opacity: 0.1;
}
</style>
Jquery was utilized as follows:
$("#rtcontainer").addClass("disabledbutton");
While successful in disabling the elements, my challenge lies in changing the background color to gray.
Your assistance with this matter is greatly appreciated. Thank you!