Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • marcodeluca Friend
    #153899

    Is it really not possible to have hyperlinks that link to different tabs? There’s got to be some sort of javascript syntax to switch tabs from a link, like:

    <span onclick=”javascript-command-to-switch-tab(Tab1)”><a>Tab 1</a></span>
    <span onclick=”javascript-command-to-switch-tab(Tab2)”><a>Tab 2</a></span>

    Any ideas?

    Sherlock Friend
    #354100

    <em>@marcodeluca 192052 wrote:</em><blockquote>Is it really not possible to have hyperlinks that link to different tabs? There’s got to be some sort of javascript syntax to switch tabs from a link, like:

    <span onclick=”javascript-command-to-switch-tab(Tab1)”><a>Tab 1</a></span>
    <span onclick=”javascript-command-to-switch-tab(Tab2)”><a>Tab 2</a></span>

    Any ideas?</blockquote>

    Dear marcodeluca,

    Please kindly explain here more details !
    I am sorry but I am not sure what you want ,are you referring to the ja tabs extension ?

    marcodeluca Friend
    #354368

    I would like to have hyperlinks INSIDE an article that changes the tab.

    Meaning, if I have JaTabs activated on a page, with 3 tabs: TAB1 – TAB2 – TAB3, i can click the tab title to view the contents of that tab ( obviously).

    What I want to be able to do is in the text have a link inside TAB1 that says: View More Information, and have this link open up TAB2

    Don Lee Friend
    #354476

    <em>@marcodeluca 192483 wrote:</em><blockquote>I would like to have hyperlinks INSIDE an article that changes the tab.

    Meaning, if I have JaTabs activated on a page, with 3 tabs: TAB1 – TAB2 – TAB3, i can click the tab title to view the contents of that tab ( obviously).

    What I want to be able to do is in the text have a link inside TAB1 that says: View More Information, and have this link open up TAB2</blockquote>

    This is not supported by the jatabs currently. However, you could get this by following these steps:
    1. Open file templates/[ja template]/js/ja.script.js, and add this function


    function switchTabs (wrapid, tabindex) {
    var tabs = $(wrapid).getElement('.ja-tabs-title');
    if (!tabs || tabs.getChildren().length <= tabindex) return;
    var tab = tabs.getChildren();
    $(tab).fireEvent('click');
    }

    2. Then in your link, you call that function (as you state at your first post). The tabindex will be counted from 0. You also need detect the id of your tab wrapper.

    jrausch Friend
    #472806

    How do you detect the id of the tab wrapper. I am using ja-communityplus and the id is different everytime the page loads///

    Luna Garden Moderator
    #472854

    <em>@jrausch 346069 wrote:</em><blockquote>How do you detect the id of the tab wrapper. I am using ja-communityplus and the id is different everytime the page loads///</blockquote>
    Hi what Tab-wrapper did you mention? Can you describe more about your problem so I can help you better.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 5 voices, and was last updated by  Luna Garden 12 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum