I have a JavaScript application which loads a list of items which the user may click to open, in a separate div on the page, as a detailed overview of an individual item. Generally speaking, the user should be allowed to make modifications and interact with that item inside this detailed overview. Under one specific load status, however, determined when the LIST is loaded and not the OVERVIEW, this ability to make modifications should be disabled.
I have a CSS class for the div generated to hold the overview. I want the option to add or remove properties from that class on page load, BEFORE any list item is opened, so that depending on the load status pointer events will be enabled or disabled for any item overviews the user goes on to open.
Something like:
my-css-class.addProperty("pointer-events: none");
Is that possible? Can CSS classes be modified on the fly like this? For context, I am using TypeScript and Less CSS.