[EMAIL PROTECTED] wrote:
Thanks for this info. One thing I notice when doing this is that when
I reinitialize the tabs, a whole new group of <div id="remote-tab-#">
containers gets created. So for example, if there were 5 tabs
initially, and then I try and add a 6th, after reinitialization, there
are now
<div id="remote-tab-1">...</div>
...
<div id="remote-tab-11">...</div>
containers. Here is the code I am using, which is basically what you
provided. Maybe my tweaks messed it up?
jQuery.fn.newTabs = function(order_id) {
$('ul.tabs-nav a', this).unbind('click');
return this.tabs(order_id, {
remote: true,
fxFade: true,
fxSpeed: 'fast',
onShow: function(clicked, shown, hidden) {
clickTabAction(shown, false);
}
});
};
...
var ul = $('#container ul');
ul.append("<li id=\"tab" + retVal + "\"><a href=
\"draw_modules.php?tab_id=" + retVal + "\">" + name + " <span id=
\"moduleCount" + retVal + "\" class=\"tabModuleCount\">(0)</span></a></
li>\n");
var order_id = getSelectedTabOrderId();
$('#container').newTabs(order_id);
- Dave
Yes, I didn't take remote tabs into account. That said, I cannot support
creating Tabs properly right now, I'm sorry. Again, this will go into
Tabs 3.
One workaround could be to disable certain tabs right from the beginning
and enable them as you need them. Disabled tabs could be hidden via CSS:
/* hide disabled tabs */
.tabs-disabled {
display: none;
}
// initialize tabs with immediatly disabling
$('#container').tabs({
remote: true,
disabled: [4, 5]
});
// enable a tab later on
$('#container').enableTab(4);
-- Klaus
-- Klaus