I have to access CSS class by name, and the code below works. However if I try hui[\"myclass\"] or hui[\".myclass\"] instead of hui[0]
hui[\"myclass\"]
hui[\".myclass\"]
hui[0]
To access the class from javascript you just need to create a classist, if it's not there.
document.querySelector("myDiv").classList.add("className");
This adds the new class to the div with the specified class name.
Else:
document.querySelector(".className");