Skip to content

Commit 74e741a

Browse files
committed
updated zepto to latest with fx module included, better checks for default options (#8)
1 parent 4a9777c commit 74e741a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

lib/simpleslideview.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.6.3
21
(function() {
32
var $, SimpleSlideView, defaults, outerHeight, outerWidth, pushOrPop, resetStyles, scrollCallback;
43

@@ -20,11 +19,11 @@
2019
views: '.view',
2120
activeView: null,
2221
deferOn: false,
23-
duration: $.fx.speeds._default,
22+
duration: ($.fx != null) && ($.fx.cssPrefix != null) ? $.fx.speeds._default : 400,
2423
easing: typeof Zepto !== "undefined" && Zepto !== null ? 'ease-out' : 'swing',
2524
useTransformProps: typeof Zepto !== "undefined" && Zepto !== null,
2625
use3D: (typeof Modernizr !== "undefined" && Modernizr !== null) && Modernizr.csstransforms3d,
27-
cssPrefix: $.fx.cssPrefix != null ? $.fx.cssPrefix : '',
26+
cssPrefix: ($.fx != null) && ($.fx.cssPrefix != null) ? $.fx.cssPrefix : '',
2827
resizeHeight: true,
2928
heightDuration: null,
3029
concurrentHeightChange: typeof Zepto === "undefined" || Zepto === null,

lib/simpleslideview.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/simpleslideview.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ defaults =
2929

3030
# The speed of animations. Defaults to the current
3131
# jQuery or Zepto default.
32-
duration: $.fx.speeds._default
32+
duration: if $.fx? and $.fx.cssPrefix? then $.fx.speeds._default else 400
3333

3434
# The easing method to use for animations. Defaults
3535
# to 'ease-out' for Zepto and 'swing' for jQuery.
@@ -47,7 +47,7 @@ defaults =
4747

4848
# The CSS prefix to use for the 'transform' property.
4949
# Defaults to the one the framework is using (if any).
50-
cssPrefix: if $.fx.cssPrefix? then $.fx.cssPrefix else ''
50+
cssPrefix: if $.fx? and $.fx.cssPrefix? then $.fx.cssPrefix else ''
5151

5252
# If 'true', the height of the container will be resized
5353
# to match the height of the active view (both initially

0 commit comments

Comments
 (0)