Ticket #3924 (new feature)

Opened 14 months ago

Last modified 3 weeks 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 (0.7 kB) - added by prekageo 6 months ago.
jquery-ui-tab-closable.js (0.7 kB) - added by prekageo 6 months ago.

Change History

Changed 14 months ago by klaus.hartl

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

Changed 10 months ago by joern.zaefferer

  • milestone changed from TBD to 1.next

Spec needed.

Changed 6 months ago by prekageo

Changed 6 months ago by prekageo

Changed 6 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 5 months ago by mdalessio

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

Changed 3 weeks 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.