Enhanced attr(String, Function) to pass through index of current element
[jquery.git] / src / jquery / coreTest.js
index f736d4d..5dd9d80 100644 (file)
@@ -82,8 +82,9 @@ test("attr(String)", function() {
 });\r
 \r
 test("attr(String, Function)", function() {\r
-       expect(1);\r
+       expect(2);\r
        ok( $('#text1').attr('value', function() { return this.id })[0].value == "text1", "Set value from id" );\r
+       ok( $('#text1').attr('title', function(i) { return i }).attr('title') == "0", "Set value with an index");\r
 });\r
 \r
 test("attr(Hash)", function() {\r