diff options
author | Oleg <markelog@gmail.com> | 2012-12-20 03:52:08 +0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-12-20 20:55:30 -0500 |
commit | 5afc93c436020f8ceabe8cab449f1c0030ba6ecd (patch) | |
tree | c1227810452cb5a1771d79dec20207a5869bade6 /test/unit/manipulation.js | |
parent | 96a349e46d61ee05e576b8544051e375094c0b4d (diff) | |
download | jquery-5afc93c436020f8ceabe8cab449f1c0030ba6ecd.tar.gz jquery-5afc93c436020f8ceabe8cab449f1c0030ba6ecd.zip |
Fix #13094. Pass index to .before(fn) fn as documented. Close gh-1093.
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r-- | test/unit/manipulation.js | 8 |
1 files changed, 8 insertions, 0 deletions
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("<div/><div/>").before(function( index ) { + equal( index, i++, "Index should be correct" ); + }); +}); |