From: nesl247 Date: Mon, 30 Dec 2013 21:30:47 +0000 (+0000) Subject: The bullets weren't working with the previous change. This makes sure both the bullet... X-Git-Tag: v5.2.0~97^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4020%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git 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 --- 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() {