count = 0;
expect(2);
test.toggleClass("testChangeBackground", duration, function() {
- present( test.css("backgroundColor"), [ "#ffffff", "rgb(255, 255, 255)" ], "Color is final" );
+ present( test.css("backgroundColor"), [ "#ffffff", "#fff", "rgb(255, 255, 255)" ], "Color is final" );
start();
});
setTimeout(function() {
var color = test.css("backgroundColor");
- notPresent( color, [ "#000000", "#ffffff", "rgb(0, 0, 0)", "rgb(255,255,255)" ],
+ notPresent( color, [ "#000000", "#ffffff", "#000", "#fff", "rgb(0, 0, 0)", "rgb(255,255,255)" ],
"Color is not endpoints in middle." );
}, mid);
});
h2 = test.find("h2");
expect(4);
+ setTimeout(function() {
+ notPresent( h2.css("fontSize"), ["10px","20px"], "Font size is neither endpoint when in middle.");
+ }, mid);
test.toggleClass("testChildren", { children: true, duration: duration, complete: function() {
equal( h2.css("fontSize"), "20px", "Text size is final during complete");
test.toggleClass("testChildren", duration, function() {
equal( h2.css("fontSize"), "10px", "Text size revertted after class removed");
+
start();
});
setTimeout(function() {
- equal( h2.css("fontSize"), "20px", "Text size unchanged with children: undefined" );
+ equal( h2.css("fontSize"), "20px", "Text size unchanged during animate with children: undefined" );
}, mid);
}});
- setTimeout(function() {
- notPresent( h2.css("fontSize"), ["10px","20px"], "Font size is neither endpoint when in middle.");
- }, mid);
});
})(jQuery);
restore = o.restore || false,
scale = o.scale || 'both',
origin = o.origin,
- original = {
- height: el.height(),
- width: el.width()
- },
- baseline, factor;
+ original, baseline, factor;
+
+ if ( mode === "show" ) {
+ el.show();
+ }
+ original = {
+ height: el.height(),
+ width: el.width()
+ };
el.from = o.from || original;
el.to = o.to || original;
if ( scale == 'box' || scale == 'both' ) {
// Vertical props scaling
- if ( factor.from.y != factor.to.y ) {
+ if ( factor.from.y !== factor.to.y ) {
props = props.concat( vProps );
el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
};
// Horizontal props scaling
- if ( factor.from.x != factor.to.x ) {
+ if ( factor.from.x !== factor.to.x ) {
props = props.concat( hProps );
el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
if ( scale == 'content' || scale == 'both' ) {
// Vertical props scaling
- if ( factor.from.y != factor.to.y ) {
+ if ( factor.from.y !== factor.to.y ) {
props = props.concat( cProps );
el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );