title: shuffle svg images / random svg image for swiper
body: <p>Hello i am useing the popular swiper from swiperjs.com. I want to make random/shuffled images from a array to appear but somehow it does not work.
  If i place&quot; outside the slidercontainer it works and random svg-images from the specified array appear. If i place it inside the swipercontainer as seen below nothing appears.</p>
  <p>my code:</p>
  <pre><code>&lt;!-- Slider main container --&gt;
  &lt;div class=&quot;swiper&quot; &gt;
    &lt;!-- Additional required wrapper --&gt;
    &lt;div class=&quot;swiper-wrapper&quot;&gt;
      &lt;!-- Slides --&gt;
  
      
  
      &lt;div class=&quot;swiper-slide  &quot;&gt;  &lt;img src=&quot;&quot; id=&quot;dynamicImage&quot; /&gt;    &lt;/div&gt;
      &lt;div class=&quot;swiper-slide  &quot;&gt;  &lt;img src=&quot;&quot; id=&quot;dynamicImage&quot; /&gt;    &lt;/div&gt;
      &lt;div class=&quot;swiper-slide  &quot;&gt;  &lt;img src=&quot;&quot; id=&quot;dynamicImage&quot; /&gt;    &lt;/div&gt;
      &lt;div class=&quot;swiper-slide  &quot;&gt;  &lt;img src=&quot;&quot; id=&quot;dynamicImage&quot; /&gt;    &lt;/div&gt;
  
  
   &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  <p>My Javascript for random images from the array</p>
  <pre><code>// create array of image URLs
  var cards = ['1.svg','2.svg'];
  
  // get the image element
  var image = document.getElementById(&quot;dynamicImage&quot;);
  
  // set the image src to a random image URL
  image.src = cards[Math.floor(Math.random() * cards.length)];
  </code></pre>
  <p>Many thanks in advance</p>