1. Colin Copeland
  2. copelco

Commits

Colin Copeland  committed 3eeef76

add JS to trigger slideshow rotation

  • Participants
  • Parent commits 068de63
  • Branches default

Comments (0)

Files changed (1)

File lib/copelco/static/js/slideshow.js

View file
+(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);