Skip to main content

Search and Top Navigation

#6125 closed bug (fixed)

Opened September 29, 2010 05:22PM UTC

Closed October 04, 2010 02:41PM UTC

Last modified November 19, 2010 06:26PM UTC

Incorrect selection of tab on init with hash in url and misordered divs

Reported by: jenters Owned by:
Priority: minor Milestone: 1.8.6
Component: ui.tabs Version: 1.8.5
Keywords: hash Cc:
Blocked by: Blocking:

When the URL has a hash and the tabs are not ordered in the same way as the divs containing the tab content, the correct content is not displayed.

Given the following page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Tab Test</title>
	<link href="jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" />

	<script type="text/javascript" src="jquery-1.4.2.js"></script>
	<script type="text/javascript" src="jquery.ui.core.js"></script>
	<script type="text/javascript" src="jquery.ui.widget.js"></script>
	<script type="text/javascript" src="jquery.ui.tabs.js"></script>
	<script type="text/javascript">
		$(document).ready(function () {

<div class="uiTabs">
		<li><a href="#tab1">Tab1</a></li>
		<li><a name="tab2" href="#tab2">Tab2</a></li>
	<div id="tab2">Showing tab #2</div>
	<div id="tab1">Showing tab #1</div>


When you navigate to

the second tab will be selected but, the content in #tab1 is displayed.

Attachments (0)
Change History (3)

Changed October 04, 2010 02:41PM UTC by scottgonzalez comment:1

milestone: TBD1.9
resolution: → fixed
status: newclosed

Fixed in c3145b6.

Changed October 25, 2010 07:00PM UTC by scottgonzalez comment:2


Changed November 19, 2010 06:26PM UTC by jenters comment:3

Tab: modified init to display correct content of misordered div when hash present in url. Fixed #6125 - Incorrect selection of tab on init with hash in url and misordered divs

Changeset: c3145b691b0d028f94fc43c035047d532de94112