From 5afc93c436020f8ceabe8cab449f1c0030ba6ecd Mon Sep 17 00:00:00 2001 From: Oleg Date: Thu, 20 Dec 2012 03:52:08 +0400 Subject: Fix #13094. Pass index to .before(fn) fn as documented. Close gh-1093. --- test/unit/manipulation.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/unit/manipulation.js') diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 35beb5267..86b26e040 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -2238,3 +2238,11 @@ test( "insertAfter, insertBefore, etc do not work when destination is original e jQuery("#test4087-multiple").remove(); }); }); + +test( "Index for function argument should be received (#13094)", 2, function() { + var i = 0; + + jQuery("
").before(function( index ) { + equal( index, i++, "Index should be correct" ); + }); +}); -- cgit v1.2.3