Replacing SVG block with js
I have two SVG image files. Other is supposed to use on desktop sizes and another on mobile sizes. But how can I change between the files? I can't use just simply img tag because I have link inside svg. Current implemention is following..
In my template:
<?php include("img/content/myimage_mobile.svg"); ?>
Now this works perfectly fine on mobile. The link etc. works nicely. But when come to desktop size, how can I change that file to myimage.svg? With JS somehow?
Haha, sorry for this. This actually was stupid. Of course I just wrap those SVGs into two divs and then with CSS & media queries show those divs on right moments :D