#3594 closed enhancement (worksforme)
selectOnAdd
Reported by: | brian | Owned by: | klaus.hartl |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.tabs | Version: | 1.6rc2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Add the option to automatically select new tabs when they are added.
Code changes:
- Add "selectOnAdd: false" as default for option.
- Add "if (o.selectOnAdd) this.select(index);" as last line on "add" function
Note: Attached ui.tabs.js includes fix for ticket #3593 so "add" functionality works correctly.
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | selectOnAdd.zip added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
That is one possibility. But tabs could be added to the middle of the list too. That would require some additional logic.
It'd just be nice to have the option of making it the default behavior when you initialize the tabs.
comment:3 Changed 14 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
No need for an option in the core IMHO. A simple solution is already described here: http://docs.jquery.com/UI/Tabs#...immediately_select_a_just_added_tab.3F
Note: See
TracTickets for help on using
tickets.
Perhaps allowing negative numbers for the index (to start from the right instead of the left) would prevent the need for this option.
This could probably be limited to only allowing -1 for the last tab if that would be easier.