title: Randomly display two of five images with JavaScript (jQuery)
body: <p>I've got a block of HTML that looks like this:</p>
  
  <pre><code>&lt;div id="banners"&gt;
      &lt;a href="p1.html"&gt;&lt;img src="img1.jpg" /&gt;&lt;/a&gt;
      &lt;a href="p2.html"&gt;&lt;img src="img2.jpg" /&gt;&lt;/a&gt;
      &lt;a href="p3.html"&gt;&lt;img src="img3.jpg" /&gt;&lt;/a&gt;
      &lt;a href="p4.html"&gt;&lt;img src="img4.jpg" /&gt;&lt;/a&gt;
      &lt;a href="p5.html"&gt;&lt;img src="img5.jpg" /&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Using JavaScript, I'd like to randomly pick two of those images and their corresponding links and display them, while hiding the others. Also, they need to not be duplicates, meaning, I want to avoid showing something like img1.jpg img1.jpg at the same time.</p>
  
  <p>jQuery is being used on the site, so it'd be nice if the proposed solution was a jQuery solution.</p>
  
  <p>It's unfortunate that I don't have access to the backend of this site, or else I'd explore a server-side solution. It's just not possible in this instance.</p>