From 9c09373b278ca5fa6c70910385551dc479173497 Mon Sep 17 00:00:00 2001 From: zurbchris Date: Tue, 18 Sep 2012 11:28:03 -0700 Subject: [PATCH] updated orbit test --- test/orbit.html | 9 +++++--- .../foundation/jquery.foundation.orbit.js | 22 +++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/test/orbit.html b/test/orbit.html index 6a1406ff7b..8083aaecea 100644 --- a/test/orbit.html +++ b/test/orbit.html @@ -63,20 +63,23 @@

Content Slider

-
+

This is a content slider.

Each slide holds arbitrary content, like text or actions.

-
+

We can include text and buttons, like this!

We take no responsibility for what happens if you click this button.

Rock My World!

-
+

What? You didn't click it?

We'll give you the benefit of the doubt. Maybe you did, and now you're back!

+ Here is a caption... + Here is a caption2... + Here is a caption3...
diff --git a/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js b/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js index b22abde4c6..c5f1e806f0 100644 --- a/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +++ b/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js @@ -9,7 +9,7 @@ (function ($) { 'use strict'; - + $.fn.findFirstImage = function () { return this.first() .find('img') @@ -78,7 +78,7 @@ this.$element = $(element); this.$wrapper = this.$element.wrap(this.wrapperHTML).parent(); this.$slides = this.$element.children('img, a, div'); - + this.$element.bind('orbit.next', function () { self.shift('next'); }); @@ -117,7 +117,7 @@ this.$element .addClass('orbit') .css({width: '1px', height: '1px'}); - + this.$slides.addClass('orbit-slide'); this.setDimentionsFromLargestSlide(); @@ -154,7 +154,7 @@ //Collect all slides and set slider size of largest image var self = this, $fluidPlaceholder; - + self.$element.add(self.$wrapper).width(this.$slides.first().outerWidth()); self.$element.add(self.$wrapper).height(this.$slides.first().height()); self.orbitWidth = this.$slides.first().outerWidth(); @@ -186,11 +186,11 @@ //var inner = $("
").css({"display":"inline-block", "width":"2px", "height":"2px"}); //$fluidPlaceholder = $("
").css({"float":"left"}); //$fluidPlaceholder.wrapInner(inner); - + //$fluidPlaceholder = $("
").css({"height":"1px", "width":"2px"}); //$fluidPlaceholder = $("
"); } - + self.$element.prepend($fluidPlaceholder); $fluidPlaceholder.addClass('fluid-placeholder'); self.$element.add(self.$wrapper).css({width: 'inherit'}); @@ -654,7 +654,7 @@ Commercial use requires attribution. var Holder = Holder || {}; (function (app, win) { - + var preempted = false, fallback = false, canvas = document.createElement('canvas'); @@ -785,7 +785,7 @@ app.run = function (o) { var options = extend(settings, o), images = selector(options.images), preempted = true; - + for (var l = images.length, i = 0; i < l; i++) { var theme = settings.themes.gray; var src = images[i].getAttribute("data-src") || images[i].getAttribute("src"); @@ -811,16 +811,16 @@ app.run = function (o) { images[i].setAttribute("data-src", src); var dimensions_caption = dimensions.width + "x" + dimensions.height; images[i].setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); - + // Fallback // images[i].style.width = dimensions.width + "px"; // images[i].style.height = dimensions.height + "px"; images[i].style.backgroundColor = theme.background; - + var theme = (text ? extend(theme, { text: text }) : theme); - + if (!fallback) { images[i].setAttribute("src", draw(ctx, dimensions, theme)); }