Sorry if this is a dupe, but my first post doesn't seem to have
appeared.

Here's the code

Adding a Tab
$(document).ready(function(){
    $('.view').click(function(){
        var url = '/groups/view/'+$(this).attr('id');
        $('#tabs').tabs('add', url, 'View Group', 4);
        $('#tabs').tabs('select', 4);

    });
});

Removing the added Tab
$(document).ready(function(){
    $('#tabs').tabs({
        select: function(e, ui){
           if (ui.index < 4 && $('#tabs').tabs('length') > 4){
               $('#tabs').tabs('remove',4);
           }
        }

    });
});


Basically, we want to add a tab when a user clicks a link in one of
the static tabs, then select it.  This is working fine.  Then if the
user switches back to a static tab the dynamically generated tab
should be removed.  This works but up to a point.
When the tab is removed, all the other tabs loose their content and
Firebug shows a "Too much recursion error"

Anyone have any ideas on how to fix this?

Cheers

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to