Opened 11 years ago

Closed 9 years ago

Last modified 7 years ago

#3924 closed feature (wontfix)

Provide option to make tabs closable

Reported by: klaus.hartl Owned by: klaus.hartl
Priority: major Milestone: 1.6
Component: ui.tabs Version: 1.6rc5
Keywords: Cc:
Blocked by: Blocking:

Description

There should be a little button inside a tab to close it.

Design is required as well.

Attachments (2)

jquery-ui-tab-closable.css (678 bytes) - added by prekageo 10 years ago.
jquery-ui-tab-closable.js (746 bytes) - added by prekageo 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by klaus.hartl

See also http://ui.jquery.com/bugs/ticket/2470 for patch (probably outdated) and some specification ideas.

comment:2 Changed 11 years ago by Jörn Zaefferer

Milestone: TBD1.next

Spec needed.

Changed 10 years ago by prekageo

Attachment: jquery-ui-tab-closable.css added

Changed 10 years ago by prekageo

Attachment: jquery-ui-tab-closable.js added

comment:3 Changed 10 years ago by prekageo

Based on original work from Mike Dalessio: http://flavoriffic.blogspot.com/2008/05/jquery-ui-and-closable-tabs.html

I made the following patches to include close buttons for tabs in jQuery UI 1.7.2:

  • CSS file (added two !important)
  • JS file (extending _tabify and defaults, using code from the original author)

Please note that closable = 'selected' is not implemented as it was in the original code.

comment:4 Changed 10 years ago by mdalessio

Awesome. I'd love to see this feature make it in (finally). +1

comment:5 Changed 10 years ago by wcravens

This feature worked well for me... but it doesn't play nicely with .tabs().add() as it is. It will append multiple closing anchors. I'm no expert but this worked for me:

    ...
    this.$lis.not(':has(a.' + o.closeAnchorClass + ')').each(function(){
    ...

comment:6 Changed 9 years ago by Scott González

Resolution: wontfix
Status: newclosed

This should be an extension.

comment:7 Changed 7 years ago by Scott González

Milestone: 1.next1.6
Note: See TracTickets for help on using tickets.