Commits

Colin Copeland committed 3eeef76

add JS to trigger slideshow rotation

Comments (0)

Files changed (1)

lib/copelco/static/js/slideshow.js

+(function($) {
+	var timer = setInterval(next_image, 10000);
+	function next_image() {
+		var target = $('ul#slideshow li.target');
+		var next_target = target.next();
+		if (next_target.length == 0) {
+			next_target = $('ul#slideshow li:first');
+		}
+		next_target.addClass('target');
+		target.removeClass('target');
+	}
+})(jQuery);