X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=7be53f738338d7af3f66338ee6033627445c280f;hb=76d6d445bb68009c010e0b91dbf21747bc2d35ba;hp=a189739035697f798f18416923a61fc163c947db;hpb=d97397d38e4c578cf999ea09c31f20702ff2c387;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index a189739..7be53f7 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -429,6 +429,15 @@ test("removeClass(String) - add three classes and remove again", function() { ok( pass, "Remove multiple classes" ); }); +test("toggleClass(String)", function() { + var e = $("#firstp"); + ok( !e.is(".test"), "Assert class not present" ); + e.toggleClass("test"); + ok( e.is(".test"), "Assert class present" ); + e.toggleClass("test"); + ok( !e.is(".test"), "Assert class not present" ); +}); + test("removeAttr(String", function() { ok( $('#mark').removeAttr("class")[0].className == "", "remove class" ); });