Permalink
Browse files

Added leading zero to decimal. Prevents ambiguity and keeps the ghost…

… of Crockford from rising to complain about coding style.

Removed unnecessary var keyword, since we're passing in "left" as a param.
  • Loading branch information...
1 parent f819794 commit 14bb8fc7d0305871e5485e37592591d8f2580f9e @gordonbrander committed Nov 23, 2011
Showing with 3 additions and 4 deletions.
  1. +3 −4 plugin.js
View
@@ -319,7 +319,7 @@
carousel.init(this);
$(opt.nextSlide + ',' + opt.prevSlide)
- .bind('click', function(e) {
+ .bind('click', function(e) {
var $el = $(this),
link = this.hash,
dir = ( $el.is(opt.prevSlide) ) ? 'prev' : 'next',
@@ -411,7 +411,7 @@
var $el = $(this),
transitionSwap = function($el, tog) {
- var speed = .3,
+ var speed = 0.3,
transition = ( tog ) ? "margin-left " + speed + "s ease" : 'none';
$el.css({
@@ -423,8 +423,7 @@
});
},
roundDown = function(left) {
- var left = parseInt(left, 10);
-
+ left = parseInt(left, 10);
return Math.ceil( (left - (left % 100 ) ) / 100) * 100;
},
snapBack = function(e, ui) {

1 comment on commit 14bb8fc

Wilto commented on 14bb8fc Nov 23, 2011

Whoop. Good catches, all.

Please sign in to comment.