Ok, how do I implement this code:

var $tabs = $('#example').tabs(); // first tab selected

$('#my-text-link').click(function() { // bind click event to link
    $tabs.tabs('select', 2); // switch to third tab
    return false;
});

I'm also looking at the bit of code that looks like this:

$(".selector").tabs("select", '#foo');

...but again, I'm not clear on how to implement it. I've tried putting
it in a onclick handler, but it doesn't work.

On Dec 31, 7:33 am, Klaus Hartl <klaus.ha...@googlemail.com> wrote:
> I assume you're using UI Tabs...
>
> http://docs.jquery.com/UI/Tabs#...select_a_tab_from_a_text_link_inste...
>
> --Klaus
>
> On 30 Dez., 19:09, Ted <theodorew...@gmail.com> wrote:
>
>
>
> > I'm having a problem with Jquery's tab plugin.
>
> > Specifically, I've got a page with a couple of tabs. On that page, in
> > one of the tabs, is a link to another tab. However, the link doesn't
> > work. Additionally, I've noticed that on my main navigation, if I'm on
> > the page with multiple tabs, and I click a link to a specific tab, it
> > will not load.
>
> > For example:
>
> > The page is page.html. With in that page are 3 tabs, #tab1, #tab2, and
> > #tab3.
>
> > If within the div for #tab1 I want to link to #tab3 by using "a
> > href="#tab3", it doesn't work.
>
> > Additionally, if I'm on page.html, and I want to load #tab3 by
> > clicking on the main navigation that has "page.html#tab3 as the link,
> > it doesn't work.
>
> > Anyone know of a fix for this?
>
> > Thanks,
> > Ted

Reply via email to