I've got a DIV covering the entire document:
<DIV style="position:'fixed';left:'0px';width:'100%';height:'100%';top:'0px',z-index:-20">
The zIndex of -20 is to prevent the DIV from coming up on top of other elements and interfering with mouse events.
However, when the page is busy with an asynchronous request, I want to bring the DIV to the top. My async request function sets the class of a user-defined variable element to "AJaXBusy" and then I style that class however I want. However, in this case, the style of "zIndex:100" isn't working, because the default value of -20 is overriding it!
Here's the code I'm using the show the DIV:
css('.AJaXBusy').backgroundColor="#ffddff"
css('.AJaXBusy').zIndex='100 !important'
(The CSS function returns a style-sheet object style property, it's about 30 lines of code so I have omitted it.)
How do I get a CSS class definition to override the value that has been assigned directly to the element? I've read about specificity and inheritance, but it didn't seem to address effects applicable in the document itself.