aboutsummaryrefslogtreecommitdiffstats
path: root/src/fx/fxTest.js
blob: 23de82ac4c34baa9af45ff288055953bf475fee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module("fx");

test("animate(Hash, Object, Function) - assert that animate doesn't modify its arguments", function() {
	expect(1);
	stop();
	var hash = {opacity: 'show'};
	var hashCopy = $.extend({}, hash);
	$('#foo').animate(hash, 'fast', function() {
		ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
		start();
	});
});

test("toggle()", function() {
	var x = $("#foo");
	ok( x.is(":visible") );
	x.toggle();
	ok( x.is(":hidden") );
	x.toggle();
	ok( x.is(":visible") );
});