X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;fp=test%2Funit%2Fmanipulation.js;h=e07108696aa2aa17f55c133cca44dd2861604928;hp=f0e2eaec2643820d9e5b68f853672e76164e2ec8;hb=375b78783825b9adab7a01541faf99f98ef7ecbd;hpb=eb5aab99525ede9f8609fbfc741c6337cf2d5061 diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index f0e2eae..e071086 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -953,6 +953,17 @@ test("clone()", function() { div.remove(); clone.remove(); + var divEvt = jQuery("
").click(function(){ + ok( false, "Bound event still exists after .clone()." ); + }), + cloneEvt = divEvt.clone(); + + // Make sure that doing .clone() doesn't clone events + cloneEvt.trigger("click"); + + cloneEvt.remove(); + divEvt.remove(); + // this is technically an invalid object, but because of the special // classid instantiation it is the only kind that IE has trouble with, // so let's test with it too.