Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using the defaults hash

  • Loading branch information...
commit 2838416b54950199e2262f0d12dd5c18e3ae7f2b 1 parent cbdfc5a
Scott Werner authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 wwcarousel.js
7 wwcarousel.js
View
@@ -1,6 +1,9 @@
(function($){
$.fn.wwcarousel = function(options){
- var defaults = {};
+ var defaults = {
+ afterAnimate: function(){},
+ speed: 400
+ };
var viewport = $(this);
options = $.extend(defaults, options);
@@ -10,8 +13,6 @@
options.container.initialLeft = $(options.container).position().left;
options.width = $(options.elements).first().outerWidth(true);
options.count = $(options.elements).length;
- options.speed = options.speed ? options.speed : 400;
- options.afterAnimate = options.afterAnimate ? options.afterAnimate : function(){};
if(options.autoSpeed){
setTimeout(function(){autoAdvance();}, options.autoSpeed);
}
Please sign in to comment.
Something went wrong with that request. Please try again.