Browse Source

Add logic for disabling scale transform if they aren't supported

pull/14/head
David DeSandro 14 years ago
parent
commit
144a146ed6
  1. 18
      src/jquery.molequul.js
  2. 2
      src/jquery.opto-transform.js

18
src/jquery.molequul.js

@ -15,12 +15,10 @@
containerClass : 'molequul',
hiddenClass : 'molequul-hidden',
hiddenStyle : {
opacity : 0,
scale : [ 0.001 ]
opacity : 0
},
visibleStyle : {
opacity : 1,
scale : [ 1 ]
opacity : 1
},
animationEngine : 'best-available',
animationOptions: {
@ -558,6 +556,18 @@
};
// add transform default styles for filtered classes
if ( Modernizr.csstransforms ) {
$.molequul.defaults.hiddenStyle = {
opacity : 0,
scale : [ 0.001 ]
};
$.molequul.defaults.visibleStyle = {
opacity : 1,
scale : [ 1 ]
};
}
// molequul code begin
$.fn.molequul = function( firstArg ) {

2
src/jquery.opto-transform.js

@ -56,6 +56,8 @@
}
// get proper order
// ideally, we could loop through this give an array, but since we only have
// a couple transforms we're keeping track of, we'll do it like so
var translateFn = transformObj.translate || '',
scaleFn = transformObj.scale || '',
valueFns = translateFn + scaleFn;

Loading…
Cancel
Save