Skip to content

Instantly share code, notes, and snippets.

@Nucc
Created March 1, 2013 10:09
Show Gist options
  • Save Nucc/5063706 to your computer and use it in GitHub Desktop.
Save Nucc/5063706 to your computer and use it in GitHub Desktop.
diff --git a/wp-content/themes/frkelly/assets/js/sombrero.js b/wp-content/themes/frkelly/assets/js/sombrero.js
index 48e2ef7..da2d481 100755
--- a/wp-content/themes/frkelly/assets/js/sombrero.js
+++ b/wp-content/themes/frkelly/assets/js/sombrero.js
@@ -49,7 +49,8 @@
}());
slider.containerSelector = options.selector.substr(0,options.selector.search(' '));
- slider.container = $(slider.containerSelector, slider);
+ // slider.container = $(slider.containerSelector, slider);
+ slider.container = $("div.slides");
slider.doMath();
@@ -380,8 +380,11 @@
slider.container.bind("webkitTransitionEnd transitionend", function() {
slider.wrapup(dimension);
});
- } else {
- slider.container.animate(slider.args, options.animationSpeed, options.easing, function(){
+ } else {
+ move = JSON.stringify( slider.args );
+ move = move.replace('{"0":"translate3d(', "");
+ move = move.replace(',0,0)"}', "");
+ slider.container.animate({marginLeft: move}, options.animationSpeed, options.easing, function(){
slider.wrapup(dimension);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment