Update: jQuery Background Image Switcher

Updated our Unobtrusive Background Image Switcher jQuery plugin: added support for multiple instances per page. This means it can be called from multiple elements on the same page like that:

<div id="bg-body"></div>

<script type="text/javascript">
var srcBgArray = [
  "/path/to/image1.jpg",
  "/path/to/image2.jpg",
  "/path/to/image3.jpg"
];

$(document).ready(function() {
  $('#bg-body').bcatBGSwitcher({
    urls: srcBgArray,
    alt: 'Alt text'
  });
});
</script>

/* some other stuff here */

<div id="content-slider"></div>

<script type="text/javascript">
var srcContentImgArray = [
  "/path/to/content-image1.jpg",
  "/path/to/content-image2.jpg",
  "/path/to/content-image3.jpg"
];

$(document).ready(function() {
  $('#content-slider').bcatBGSwitcher({
    urls: srcContentImgArray,
    alt: 'Alt text'
  });
});
</script>

Not really useful for background images, but if you have a background image switcher as well as a content image slider and wouldn’t want to load too much scripts this might just be your thing, was also our reason for this update.

Demo and download links remain the same: