jQuery-EasyTabs icon indicating copy to clipboard operation
jQuery-EasyTabs copied to clipboard

How to make a link somewhere in the page to a specific tab?

Open NunoBentes opened this issue 11 years ago • 2 comments

Hello

I´m trying to make a normal link, outside of the tab container but in the same page of my tab navigation, to a specific tab. How can i make this?

Regards Nuno

NunoBentes avatar Jul 25 '13 09:07 NunoBentes

have you tried using the public method? It works for me.

http://os.alfajango.com/easytabs/#public-methods

I was wondering if you can use a normal link (a href) to navigate to another tab within the tab structure. Currently I have some links that I want to take to various tabs, but I am using the method above as a round about way to do it. Thought there might be something better.

miprogrammer avatar Sep 04 '13 19:09 miprogrammer

@Legues, the code above finds the id of the link and then waits for it to be clicked. It then stops the link from going to a page and instead switches the tab.

$('#tab-link').click(function (event) {
   $('#tabs').easytabs('select', '#tab1');
});

Change the IDs to what you need.

DaAwesomeP avatar Sep 04 '13 21:09 DaAwesomeP