- First, select the element by using DOM methods such as
document.querySelector(). The selected element has the style property
that allows you to set the various styles to the element.
- Then, set the values of the properties of the style object.
const curSidebar = document.querySelector('.ui-widget-overlay');
curSidebar.style.cssText += "opacity:0.5!important;background-color:#333!important";