#3663 closed bug (notabug)
UI-Tabs: selected option bug with core 1.2.6
Reported by: | adammarth | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.tabs | Version: | 1.5.1 |
Keywords: | jQuery 1.2.6 core tabs default selected | Cc: | |
Blocked by: | Blocking: |
Description
Using UI 1.5.1 with jQuery 1.2.3. Tabs plugin is being used with ajax loaded content. Using tabs method which takes options to create tabs object. Options include 'selected' parm to select the second tab (out of 2 total). This works as desired.
Introduced jQuery core 1.2.6r5685. The 'selected' parm no longer appears to work. The page loads, but no content is displayed. If I view the generated source of the page using FireFox and the Web Developer plugin, I can see that the ajax content is loaded correctly, but the "ui-tabs-panel" (which is being targeted via the tab with an id of "tabContent") contains the class "ui-tabs-hide" causing the content to be hidden. If I then click on the first tab, the content is loaded for that tab and displayed to the user; however, the second tab is not active and cannot be clicked.
If I pass a 0 as the default selected, or remove the parm from the options passed, the 0 tab displays correctly and I am able to click on the second tab and its content displays correctly.
I have found a workaround that works. Broken:
$(document).ready(function(){ $("#tabs").tabs({remote: true, selected: 1}); });
Workaround:
$(document).ready(function(){ var tabs=$("#tabs").tabs({remote: true, selected: null}); tabs.tabs('select',1); });
Example page is attached and is meant only to convey our usage. This is not known to be a working example.
Attachments (1)
Change History (3)
Changed 14 years ago by
Attachment: | UI-BugTrackerExample.txt added |
---|
comment:1 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Incoorect usage. Each tab must have its own panel.
Example file to show our usage of tabs