Skip to content

Instantly share code, notes, and snippets.

@dmethvin
Created December 15, 2011 15:45
Show Gist options
  • Save dmethvin/1481562 to your computer and use it in GitHub Desktop.
Save dmethvin/1481562 to your computer and use it in GitHub Desktop.
Test case for #9777
test("clone() attributes are independent (#9777)", function () {
expect(1);
var attrName = "quack",
orig = jQuery( '<button>hi</button>' ).appendTo( "#qunit-fixture" ),
clone1 = orig.clone().attr( attrName, "clone1" ).appendTo( "#qunit-fixture" ),
clone2 = clone1.clone().attr( attrName, "clone2" ).appendTo( "#qunit-fixture" );
equal( clone1.attr(attrName), "clone1", "First clone's attr is unmolested" );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment