I've got a block of HTML that looks like this:
<div id="banners">
<a href="p1.html"><img src="img1.jpg" /></a>
<a href="p2.html"><img src="img2.jpg" /></a>
<a href="p3.html"><img src="img3.jpg" /></a>
<a href="p4.html"><img src="img4.jpg" /></a>
<a href="p5.html"><img src="img5.jpg" /></a>
</div>
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.
jQuery is being used on the site, so it'd be nice if the proposed solution was a jQuery solution.
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.