ZURB Foundation, switching tab programmatically

boh picture boh · Dec 5, 2012 · Viewed 13.8k times · Source

Im using asp with foundation, is there anyway to switch between a tab to another using JS or ASP?

Link (Simple tab).

Answer

Jesse Fisher picture Jesse Fisher · Dec 6, 2012

A possible solution is to assign an id to the tab link and click it using jQuery.

Given the following code excerpt, notice the id assigned to the anchor link...

<dd><a href="#simple2" id="tabId">Simple Tab 2</a></dd>

You could activate this link using this line of jQuery.

$("#tabId").click();