jquery/src/event/eventTest.js

11 lines
344 B
JavaScript
Raw Normal View History

2006-11-18 14:37:01 +01:00
module("event");
test("toggle(Function, Function) - add toggle event and fake a few clicks", function() {
expect(1);
var count = 0,
fn1 = function() { count++; },
fn2 = function() { count--; },
link = $('#mark');
link.click().toggle(fn1, fn2).click().click().click().click().click();
ok( count == 1, "Check for toggle(fn, fn)" );
});