jquery/src/fx/fxTest.js

22 lines
472 B
JavaScript
Raw Normal View History

2006-11-18 14:37:01 +01:00
module("fx");
test("animate(Hash, Object, Function)", function() {
2006-11-18 14:37:01 +01:00
expect(1);
stop();
var hash = {opacity: 'show'};
var hashCopy = $.extend({}, hash);
$('#foo').animate(hash, 0, function() {
2006-11-18 14:37:01 +01:00
ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
start();
});
});
test("toggle()", function() {
expect(3);
var x = $("#foo");
ok( x.is(":visible") );
x.toggle();
ok( x.is(":hidden") );
x.toggle();
ok( x.is(":visible") );
2006-11-18 14:37:01 +01:00
});