Ticket #3924 (new feature)

Opened 20 months ago

Last modified 7 months ago

Provide option to make tabs closable

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

Description

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

Design is required as well.

Attachments

jquery-ui-tab-closable.css Download (0.7 KB) - added by prekageo 11 months ago.
jquery-ui-tab-closable.js Download (0.7 KB) - added by prekageo 11 months ago.

Change History

Changed 20 months ago by klaus.hartl

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

Changed 16 months ago by joern.zaefferer

  • milestone changed from TBD to 1.next

Spec needed.

Changed 11 months ago by prekageo

Changed 11 months ago by prekageo

Changed 11 months 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.

Changed 11 months ago by mdalessio

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

Changed 7 months 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(){
    ...
Note: See TracTickets for help on using tickets.