Extending tabs - panelContentPlaceholder
Hello,
i've extended the tabs with a new little piece of code i needed. Maybe
you guys think it's useful and want to add it to jQuery UI.
I've added support for the a new option, the panelTemplatePlaceholder.
It's a regular expression representing some part of the panelTemplate
and gets replaced with content loaded via ajax.
I've modified
$(a.hash).html(r);
to
if ( o.panelContentPlaceholder ) {
$(a.hash).html(o.panelTemplate.replace( o.panelContentPlaceholder,
r ));
} else {
$(a.hash).html(r);
}
in the tabs code.
Now i can do things like:
$tabs.tabs( {
panelTemplate: '<div><div class="ui-tabs-panel-content"><content></
div></div>',
panelContentPlaceholder: /<content>/g
});
Have I missed a already existant way to do this?