I have a problem with responsive images especially when they have an ID.
<IMG SRCSET="images/portfolio/vide.jpg 30w, images/portfolio/vide.jpg 100w"
SIZES="(min-width: 400px) and (max-width: 640px) 30px, (min-width: 641px) and (max-width: 800px) 30px, (min-width: 801px) 100px" SRC="images/portfolio/vide.jpg" ID="Photos3D" />
I want to change the image with JS.
document.getElementById("Photos3D").srcset="images/portfolio/3d/"+Photo[Nbr]+".jpg 30w, images/portfolio/3d/"+Photo[Nbr]+".jpg 100w";
Photo[Nbr] is equal to 001 so the link is "images/portfolio/3d/001.jpg" (I tested with alert(Photo[Nbr]); and I have 001 in the window.)
But the image still remains at "images/portfolio/vide.jpg", it does not change. I think the document.getElementById("Photos3D").srcset is wrong but I don't know how to use it dynamically.