From 5334e845eed2c270620491c316d038da2a13babd Mon Sep 17 00:00:00 2001 From: Jay Stakelon Date: Tue, 29 Nov 2011 19:40:58 -0800 Subject: [PATCH] Added advanceOnClick option which mimics right arrow behavior if set to true --- jquery.orbit-1.3.0.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/jquery.orbit-1.3.0.js b/jquery.orbit-1.3.0.js index 16c5195..e6fc866 100644 --- a/jquery.orbit-1.3.0.js +++ b/jquery.orbit-1.3.0.js @@ -27,7 +27,8 @@ bulletThumbs: false, // thumbnails for the bullets bulletThumbLocation: '', // location from this file where thumbs will be afterSlideChange: $.noop, // empty function - centerBullets: true // center bullet nav with js, turn this off if you want to position the bullet nav manually + centerBullets: true, // center bullet nav with js, turn this off if you want to position the bullet nav manually + advanceOnClick: false // if you want the slide to advance if user clicks on it }, activeSlide: 0, @@ -127,6 +128,10 @@ this.setupBulletNav(); this.setActiveBullet(); } + + if (this.options.advanceOnClick) { + this.setupAdvanceOnClick(); + } }, currentSlide: function () { @@ -335,6 +340,14 @@ }); }, + setupAdvanceOnClick: function() { + var self = this; + $(this.$slides).click(function(evt) { + self.stopClock(); + self.$element.trigger('orbit.next'); + }); + }, + setupBulletNav: function () { this.$bullets = $(this.bulletHTML); this.$wrapper.append(this.$bullets);