ui.tabs initialization request

ui.tabs initialization request

Hi,
An initial page load renders DOM with all content for a selected tab,
which is great for people with no scripting.
I want to use ui.tabs widget. My tabs are built with the ajax
requirement where the <a> element href points to the desired url for
loading tab content. I also use the option where the <a> element's
title attribute is used to reference the container for tab content.
eg: <a href="/foo/bar?=open" title="tab content">Lalala</a>
<div id="tab_content"/>
If I listen to the DOM loaded event and then initialize my tabs with a
call like $
'#tabs'
.tabs
, the current ui.tabs initialization sets
up the widget to have a selected tab, and then it executes a call to
this.load
o.selected
. Unfortunately, this means that for script
enabled initial views, the controller renders the data twice with the
second call being initiated by ui.tabs.
I would like to be able to set a configuration parameter to change
this behaviour. For example, if I could initialize tabs with an
attribute {autoLoad: false
true
then the this.load
o.selected
call
could be conditional on this.autoLoad.
$
'#tabs'
.tabs
{autoLoad: false;}
;
Any comments on changing the initialization of the ui.tabs behaviour
most appreciated. To me, the default behaviour of auto-loading content
for ui.tabs is a flaw that can be easily fixed, although I am aware
that there may be some issues surrounding this. A simple diff follows.
@@ -5535,7
5535,9 @@ $.widget
"ui.tabs", {
self._trigger
'show', null,
self._ui
self.anchors[o.selected], self.panels[o.selected]
;
}
;
- this.load
o.selected
;
if
o.autoLoad
{
this.load
o.selected
;
}
}
// clean up to avoid memory leaks in certain
versions of IE 6