From b793477a2b59398d084ac846945240268d28c37a Mon Sep 17 00:00:00 2001 From: nesl247 Date: Mon, 30 Dec 2013 21:30:47 +0000 Subject: [PATCH] The bullets weren't working with the previous change. This makes sure both the bullets work, as well as clicking on the slide. If clicking on the slide isn't supposed to progress to the next slide, then the binding needs to be changed from container to bullet_container --- js/foundation/foundation.orbit.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/js/foundation/foundation.orbit.js b/js/foundation/foundation.orbit.js index f61fec748..f0aeacf8b 100644 --- a/js/foundation/foundation.orbit.js +++ b/js/foundation/foundation.orbit.js @@ -157,11 +157,19 @@ }; self.link_bullet = function(e) { - var link = $(this).attr('data-orbit-slide'); - if ((typeof link === 'string') && (link = $.trim(link)) != "") { - var slide = container.find('[data-orbit-slide='+link+']'); - if (slide.index() != -1) {self._goto(slide.index() + 1);} + var index = $(this).attr('data-orbit-slide'); + if ((typeof index === 'string') && (index = $.trim(index)) != "") { + if(isNaN(parseInt(index))) + { + var slide = container.find('[data-orbit-slide='+index+']'); + if (slide.index() != -1) {self._goto(slide.index() + 1);} + } + else + { + self._goto(parseInt(index)); + } } + } self.timer_callback = function() { -- 2.47.2