Search and Top Navigation
#7930 closed bug (worksforme)
Opened December 01, 2011 09:00PM UTC
Closed January 20, 2012 05:52PM UTC
Incorrect AJAX call when preselecting a tab
Reported by: | palbandoz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.tabs | Version: | 1.8.16 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When activating a jQueyUI Tabs with a preselected tab different than the first one, the selected tab is visually correct but the AJAX call done is not the right one, but the previous tab's one.
For instance, in the next example, if the initialActiveTab is 4, the tab titled "EEE" is selected but the AJAX call is './?ajax=3&tab=ddd'. So there is nothing showed in the selected tab.
HTML:
<div id="tabs"> <ul> <li><a href='./?ajax=3&tab=aaa'>AAA</a></li> <li><a href='./?ajax=3&tab=bbb'>BBB</a></li> <li><a href='./?ajax=3&tab=ccc'>CCC</a></li> <li><a href='./?ajax=3&tab=ddd'>DDD</a></li> <li><a href='./?ajax=3&tab=eee'>EEE</a></li> <li><a href='./?ajax=3&tab=fff'>FFF</a></li> <li><a href='./?ajax=3&tab=ggg'>GGG</a></li> </ul> </div><!--#tabs--> <input type="hidden" id="initialActiveTab" value="4"/>
Javascript:
$(document).ready( function() { $("div#tabs").tabs({ selected: $("#initialActiveTab").val() }); });
I guess the problem starts with the hrefs assigned by jQueryUI, that start in #ui-tabs-1 instead of #ui-tabs-0: