-
AuthorPosts
-
August 29, 2010 at 10:34 am #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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 30, 2010 at 7:17 am #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 ?September 1, 2010 at 2:37 pm #354368I 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 FriendDon Lee
- Join date:
- March 2010
- Posts:
- 923
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 41
- Thanked:
- 274 times in 238 posts
September 3, 2010 at 3:56 am #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.
November 13, 2012 at 5:28 pm #472806How 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 ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
November 14, 2012 at 6:50 am #472854 -
AuthorPosts
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