0

I'm trying to implement Zurb Foundation tabs in a DurandalJS app. Zurb Foundation uses # in their tab HTML structure. The # is used to link tab with it's contents.

<ul class="tabs" data-tab>
    <li class="tab-title active"><a href="#panel2-1">Tab 1</a></li>
    <li class="tab-title"><a href="#panel2-2">Tab 2</a></li>
</ul>
<div class="tabs-content">
    <div class="content active" id="Div1">
        <p>First panel content goes here...</p>
    </div>
    <div class="content" id="Div2">
        <p>Second panel content goes here...</p>
    </div>
</div>

DurandalJs is intercepting the anchor clicks and is loading my default page instead of allowing Zurb to change tabs. How do I tell DurandalJs to ignore the anchors that are used in Zurb's tab structure?

Tom Schreck
  • 5,177
  • 12
  • 68
  • 122

1 Answers1

0

This is a very common problem in single page application routers and tabs because they both use anchortags in their urls. What I would recommend is to take a different approach on your tabs structure one that does not involve anchortags.

mbejda
  • 1,471
  • 16
  • 25