javascript - Get HTML contents of child elems -
basically want transform:
<tabs> <section tab-pane> <header tab-header>tab title html <img ...></header> section body </section> <section tab-pane> .... </section> </tabs>
to (twitter's bootstrap):
<div class="tabbable"> <ul class="nav nav-tabs"> <li ng-repeat="pane in panes" ng-class="{active:pane.selected}"> <a href="" ng-click="select(pane)" >title goes here</a> </li> </ul> <div class="tab-content" ng-transclude> tabs here </div> </div>
i'm using html5 tags because think more seo friendly tags <tab-pane> etc.
i able basic version working @ http://plnkr.co/edit/2hwhazkatjyjcqxduyp7?p=preview don't know how insert each header content element.
Comments
Post a Comment