Question: I have been applying or changing the style for a CSS class in the javascript script, having a dojo f/w, like this,

```
this.sidePanel = query(".sidePanel", document.body())[0];
domStyle.set(this.sidePanel, {
    height: "25%",
    top: "334px"
});

```

This has worked fine but now I am having multiple nodes with similar CSS class. I wish to apply the new CSS style to the class and thereby all the nodes having the same class.

Is there some function in dojo which allows change in style to the CSS class directly without having to query for the node? Something like,

```
dojo.css.applyNewStyle('className', {'cssProperty': 'newValue'});

```

Answer: 
And if you don't want to include the dojo/NodeList-dom module, you can still do this :

```
query(".sidePanel").forEach(function(node){ domStyle.set(node, { height: "25%", top: "334px" })});

```

...but yeah, dojo/NodeList-dom is more concise :-)
Yes there seems to be a way, but you don't need to use dojo. Check out this other post:

[Changing CSS Values with Javascript](https://stackoverflow.com/questions/566203/changing-css-values-with-javascript)