[jQuery] Jquery ui tabs "select a tab from a text link instead of clicking a tab itself"

[jQuery] Jquery ui tabs "select a tab from a text link instead of clicking a tab itself"


Hello,
I am using still the old version of ui (not the 1.7)
I saw here http://docs.jquery.com/UI/Tabs#...select_a_tab_from_a_text_link_instead_of_clicking_a_tab_itself
the posibility to navigate between tabs by using a link and not the
tabs.
I implemented the code in my site but wanted to make it more dynamic:
$('#verder').click(function() { // bind click event to link
            var $tabs = $('#tabs').tabs();
            var selected = $tabs.data('selected.tabs');
            //console.log(selected);
            $tabs.tabs('select', selected +1); // switch to third tab
            return false;
                });
But now it only works from the first to the second tab. From the
second to the third tab and it doesn't work.
How can i make it work?