if ( jQuery.browser ) { module("deprecated"); if ( jQuery.get && !isLocal ) { asyncTest( "browser", function() { jQuery.get( "data/ua.txt", function( data ) { var uas = data.split( "\n" ); expect( (uas.length - 1) * 2 ); jQuery.each(uas, function() { var parts = this.split( "\t" ), agent = parts[2], ua; if ( agent ) { ua = jQuery.uaMatch( agent ); equal( ua.browser, parts[0], "browser (" + agent + ")" ); equal( ua.version, parts[1], "version (" + agent + ")" ); } }); start(); }); }); } test("toggle(Function, Function, ...)", function() { expect(16); var count = 0, fn1 = function(e) { count++; }, fn2 = function(e) { count--; }, preventDefault = function(e) { e.preventDefault(); }, link = jQuery("#mark"); link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click(); equal( count, 1, "Check for toggle(fn, fn)" ); jQuery("#firstp").toggle(function () { equal(arguments.length, 4, "toggle correctly passes through additional triggered arguments, see #1701" ); }, function() {}).trigger("click", [ 1, 2, 3 ]); var first = 0; jQuery("#simon1").one("click", function() { ok( true, "Execute event only once" ); jQuery(this).toggle(function() { equal( first++, 0, "toggle(Function,Function) assigned from within one('xxx'), see #1054" ); }, function() { equal( first, 1, "toggle(Function,Function) assigned from within one('xxx'), see #1054" ); }); return false; }).click().click().click(); var turn = 0; var fns = [ function(){ turn = 1; }, function(){ turn = 2; }, function(){ turn = 3; } ]; var $div = jQuery("