Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to update or change the image via JavaScript for an Icon Button

How can I get a reference to the image of an Icon Button so I can change the image via JavaScript?

Best Answer
0 Votes
2 REPLIES 2

Did you figure out how to do it?

 

EDIT: It's just simple as:


<use id="my-button" href="#icon-button" class="medium-button application-fill my-btn" />


And then
document.getElementById('my-button').image = "file.png"

Best Answer
0 Votes

I'll give that a try, thanks

Best Answer
0 Votes