In partial answer to my own question, I wrote this, which seems to
work:

                        $('#newTab').click(function() {
                                var $tabs = $('#container > 
ul.tabs-nav').tabs('length');
                                var tabNum = ($tabs + 1);
                                var newTabID = ("#" + "newTab_" + tabNum);

                                $('#container > ul.tabs-nav').tabs('add',
newTabID, 'Tab ' + tabNum);
                                $(newTabID).append('<p>new tab ' + tabNum + '</
p>');

                                return false;
                        });

However... if combined with closable tabs, it would not be able to
confirm uniqueness of the ID


On Apr 2, 11:25 am, rolfsf <[EMAIL PROTECTED]> wrote:
> Adding (appending) new tabs in ui.tabs is pretty straightforward, but
> I notice in the example:http://stilbuero.de/jquery/tabs_3/#container-9
>
> that if I append multiple new tabs, they are all given the same ID
> (which won't work well in real life)
>
> Is there an easy way to generate sequential IDs? e.g. #appendedTab_1,
> #appendedTab_2
>
> Also, is it possible to 'append' the *first* tab - in other words, add/
> create a tab to an 'empty' container?
>
> Thanks - this is the first time I've delved into the more advanced
> variations with this plugin
>
> rolfsf

Reply via email to