asp.net mvc - Tabs in material desing lite like simple ActionLinks -
i have question regarding tabs in material desing lite. here sample usage of tabs in mdl.
<div class="mdl-tabs mdl-js-tabs"> <div class="mdl-tabs__tab-bar"> <a href="#tab1" class="mdl-tabs__tab">tab one</a> <a href="#tab2" class="mdl-tabs__tab">tab two</a> </div> <div class="mdl-tabs__panel is-active" id="tab1"> <p>first tab's content.</p> </div> <div class="mdl-tabs__panel" id="tab2"> <p>second tab's content.</p> </div> </div>
looks pretty straightforward tabs simple content if have many tabs each complex content. how can make tabs work simple actionlinks perks ripple animation , is-active
class. solution put link tabs this.
<div class="mdl-layout__tab-bar mdl-js-ripple-effect mdl-color--primary-dark"> @foreach (var tab in model) { @html.actionlink(@tab.name, "tab", "index", null, new { @class = "mdl-layout__tab" }) } </div>
but links not working , im getting error uncaught typeerror: cannot read property 'classlist' of null
obiously im doing wrong or using tabs werent designed for.
Comments
Post a Comment