Hello,
Can you use the YAHOO.plugin.Dispatcher to delegate to tabs that
already exist in markup? The examples that I see all involve creating
tabs in javascript, like so:
YAHOO.plugin.Dispatcher.delegate ( new YAHOO.widget.Tab({
label: 'Team Members',
datasrc: "/link/to/datasrc",
active: true
}), topLevelTabs)
But what if you already had a tab, as part of tabview created from
markup by passing the id to the tabview widget:
var tabView = new YAHOO.widget.TabView('demo');
teamTab = tabView.getTab(0);
Could you then use the Dispatcher to delegate a datasrc to the
existing tab, teamTab? If so, what would be the syntax?
The reason I ask is because I'm creating some tabs in markup rather
than js because the markup needs to be a little different than what's
generated by default. This is in order to have a static area in each
tab that doesn't change when the datasrc is reloaded. Since you can't
have both content and a datasrc at the same time, I want to add this
extra div. But also use the dispatcher.
<ul class ="yui-nav">
// list items here
</ul>
<div>tab static content here</div>
<div class="yui-content">the panel that gets refreshed by tab
content</div>
Thanks,
Sarah