DEV Community

Discussion on: Cannot add class but elements are already added to the DOM

Collapse
 
dyland profile image
Dylan Davenport • Edited

Im the video I see he wraps

a[href="#${id}"]

In backticks like this

`a[href="#${id}"]`

That might be it.

Thread Thread
 
dvgy profile image
GAURAV YADAV • Edited

Ya that is known as temple string. Even i did the same
. Sorry i don't know why it's not showing here,but in my real code i have added template string only. Still it doesn't work