Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#4320 closed feature (worksforme)

Select Ajax tabs based on current url

Reported by: peterbraden Owned by:
Priority: minor Milestone:
Component: ui.tabs Version: 1.7
Keywords: Cc:
Blocked by: Blocking:


I have a series of pages which I wish to have available using their url or via the jquery tabs that are on each page.

The tabs should load the same urls (on the server side I return the appropriate content if the request comes from ajax).

Unfortunately the tabs do not seem to respect the current url - the first tab is always selected, which makes the operation of the links incorrect.

The desired behaviour would be for the ajax tabs to autoselect the correct tab based on which url matched the current url. Failing that there should be someway to select the intially selected tab via the html rather than writing additional javascript (.selected?)

Change History (3)

comment:1 Changed 14 years ago by klaus.hartl

Type: bugfeature

comment:2 Changed 14 years ago by klaus.hartl

Resolution: worksforme
Status: newclosed

This seems a very rare use case and as such won't go into core. Especially since you can roll your own solutions already quite easily.

One solution also mentioned - to attach the selected class to the HTML right away - is already supported. If you add the class "ui-tabs-selected" to one of the <li> tags that tab is going to become the selected one.

(Unfortunately it seems that this got lost in the documentation.)

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.