I'm pretty inexperienced with JS and I'm trying to...
# javascript
a
I'm pretty inexperienced with JS and I'm trying to set the width of an element with
element.style.setProperty("width", "$value")
. Am I doing something wrong?
g
element.setAttribute(“width”, “$value”)
j
How about: element.style.width = value
a
Thanks! I ended up using
element.style.width = "$value"
1