Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#820 closed bug (fixed)

.attr(String, Function(i){}) could use the index

Reported by: Fil Owned by:
Priority: minor Milestone: 1.1
Component: core Version: 1.1
Keywords: attr Cc: fil@…
Blocked by: Blocking:

Description

Here's the patch to the testfile:

Index: src/jquery/coreTest.js
===================================================================
--- src/jquery/coreTest.js      (revision 1073)
+++ src/jquery/coreTest.js      (working copy)
@@ -82,8 +82,9 @@
 });
 
 test("attr(String, Function)", function() {
-       expect(1);
+       expect(2);
        ok( $('#text1').attr('value', function() { return this.id })[0].value == "text1", "Set value from id" );
+       ok( $('#text1').attr('title', function(i) { return i }).attr('title') == 1, "Set value with an index");
 });
 
 test("attr(Hash)", function() {

but alas i is undefined

Attachments (1)

KenSteppProtector.txt (1.6 KB) - added by kenstepp 11 years ago.
Ken Stepp

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by Fil

After reading the documentation, this should be filed under "enhancement", not "bug".

comment:2 Changed 13 years ago by joern

Resolution: fixed
Status: newclosed

Implemented in SVN, revision 1091.

Changed 11 years ago by kenstepp

Attachment: KenSteppProtector.txt added

Ken Stepp

Note: See TracTickets for help on using tickets.