Bug Tracker

Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#5479 closed enhancement (fixed)

removeAttr: remove multiple attributes

Reported by: scottgonzalez Owned by: rwaldron
Priority: low Milestone: 1.7
Component: attributes Version: 1.5.2
Keywords: 1.7-discuss Cc:
Blocked by: Blocking:

Description

It would be nice if removeAttr() accepted multiple attributes. This could work exactly like removeClass() does.

Change History (29)

comment:1 Changed 6 years ago by dmethvin

  • Component changed from unfiled to attributes

comment:2 Changed 6 years ago by rwaldron

  • Keywords needsreview added
  • Milestone set to 1.5
  • Owner set to rwaldron
  • Priority changed from major to low
  • Status changed from new to assigned

Good suggestion

comment:3 Changed 6 years ago by dmethvin

  • Keywords needsreview removed

comment:4 Changed 6 years ago by jitter

#7649 is a duplicate of this ticket.

comment:5 Changed 6 years ago by jitter

  • Version changed from 1.3.2 to 1.4.4

comment:7 Changed 5 years ago by petersendidit

Whats the reason this isn't getting landed?

comment:8 Changed 5 years ago by timmywil

Would we like to add this to attrhooks?

comment:9 Changed 5 years ago by timmywil

  • Milestone set to 1.7
  • Version changed from 1.4.4 to 1.5.2

My guess is this will probably land with the enhancement on removeData in 1.7: #7323

comment:10 Changed 5 years ago by timmywil

#8221 is a duplicate of this ticket.

comment:11 Changed 5 years ago by john

  • Milestone changed from 1.7 to 1.next

We should consider this for 1.7.

comment:12 Changed 5 years ago by john

  • Keywords 1.7-discuss added

Nominating ticket for 1.7 discussion.

comment:13 Changed 5 years ago by rwaldron

+1, Consistent with #7323

comment:14 Changed 5 years ago by jaubourg

+1, yes to API Symmetry

comment:15 Changed 5 years ago by ajpiano

+1, Deffo

comment:16 Changed 5 years ago by timmywil

+1, Yes, but possibly with an access-like function to dry up similar functions.

comment:17 Changed 5 years ago by danheberden

+1

comment:18 Changed 5 years ago by dmethvin

+1, An access-like function would be good here.

comment:19 Changed 5 years ago by john

+1, Obvious missing API.

comment:20 Changed 5 years ago by scottgonzalez

+1, obviously, I filed the ticket :-)

comment:21 Changed 5 years ago by addyosmani

+1

comment:22 Changed 5 years ago by jzaefferer

+1, one more feature I could take out of my validation plugin

comment:23 follow-up: Changed 5 years ago by cowboy

+1, I like it, but should we do .removeAttr("foo bar") or .removeAttr("foo", "bar")?

comment:24 in reply to: ↑ 23 Changed 5 years ago by scottgonzalez

Replying to cowboy:

+1, I like it, but should we do .removeAttr("foo bar") or .removeAttr("foo", "bar")?

"foo bar", consistent with everything

comment:25 Changed 5 years ago by ajpiano

  • Milestone changed from 1.next to 1.7

comment:27 Changed 5 years ago by rwaldron

At this point, whatever, the first is out of date, but that can be fixed. The second is up-to-date, but has no tests and hasn't responded or updated with the tests I provided: ( https://github.com/rwldrn/jquery/commit/bece3a7ab2ae26947634ad57fb08390d55d209fc )

comment:28 Changed 5 years ago by rwaldron

Since no one has responded to my last comment about combining the efforts, I've gone ahead and done so myself.

Current: https://github.com/jquery/jquery/pull/492/

comment:29 Changed 5 years ago by Rick Waldron

  • Resolution set to fixed
  • Status changed from assigned to closed

Landing pull request 492. 1.7 Remove multiple attributes (Symmetry with removeClass) Combines patches submitted by leeoniya, zertosh and my own tests. Fixes #5479.

More Details:

Note: See TracTickets for help on using tickets.