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: |
Description
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.uiTabs').tabs();
});
</script>
</head>
<body>
<div class="uiTabs">
<ul>
<li><a href="#tab1">Tab1</a></li>
<li><a name="tab2" href="#tab2">Tab2</a></li>
</ul>
<div id="tab2">Showing tab #2</div>
<div id="tab1">Showing tab #1</div>
</div>
</body>
</html>
When you navigate to
http://<PATH>/page.html#tab2the second tab will be selected but, the content in #tab1 is displayed.
Fixed in c3145b6.