Changing element src

Hi,

I drag and drop an svg into my document and it appears well.
I have another svg in my resources folder.
I want for example to swipe the first SVG wich makes an action to replace it by the second one.

I Suceed to make it run with jquery and with the svg loaded into an iframe.

But I wonder how to do this without an iframe , directly on the element.

And by the way, I know it can be done with timeline but I’m coding this because I have hundred of files to swap. That’s why coding is required :wink:

thanks !

ok finally found it !
My mistake was to use the src attribute rather than the css background-image url

$("#svg").css( “background-image”,“url(${resourcesFolderName}/01012016b.svg)”);

1 Like