I have a jQuery-based "carousel" which switches between multiple sale banners on an e-commerce site. They're each pretty large, and I want the page to load as fast as possible. The first banner is referenced in the HTML, and the others are requested through the JavaScript, roughly like this:
<div class="banner"></div>
Pseudocode for the JavaScript looks like this:
for each banner
banner.css("background", "url('bannerBackground.jpg'");
So the background images are loading after the DOM is ready with jQuery's $(document).ready(). My question is: is there any advantage to using jQuery's ajax functionality to do this rather than doing it the way I am now?