X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=7be53f738338d7af3f66338ee6033627445c280f;hb=aa424984f7c37956f568512aa94bc16787e4c651;hp=a189739035697f798f18416923a61fc163c947db;hpb=789f0e1093beb559bb2acef708cc4b27c00f557d;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" ); });