From 3bec1fc578a5b430138825928ebd9636f6ca1f79 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 28 Jan 2013 15:22:19 +0100 Subject: [PATCH] Avoid 'too few slides' jquery.cycle error --- setup.py | 2 +- sponsors/static/sponsors/js/sponsors.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b35592f..97def7b 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def whole_trees(package_dir, paths): setup( name='django-sponsors', - version='1.0.2', + version='1.0.3', author='Marek Stępniowski', author_email='marek@stepniowski.com', maintainer='Radek Czajka', diff --git a/sponsors/static/sponsors/js/sponsors.js b/sponsors/static/sponsors/js/sponsors.js index fbfbaeb..fe0d7f1 100755 --- a/sponsors/static/sponsors/js/sponsors.js +++ b/sponsors/static/sponsors/js/sponsors.js @@ -1,7 +1,10 @@ (function($) { $(function() { - $('.sponsor-logos').cycle({timeout: 3000}); + $('.sponsor-logos').each(function() { + if ($(this).children().length > 1) + $(this).cycle({timeout: 3000}); + }); }); })(jQuery); -- 2.20.1