Skip to content

Instantly share code, notes, and snippets.

@achun
Last active September 27, 2017 15:46
Show Gist options
  • Save achun/232117d182eee78765ba3156eaae336b to your computer and use it in GitHub Desktop.
Save achun/232117d182eee78765ba3156eaae336b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="//unpkg.com/materialize-css/dist/css/materialize.min.css" media="screen,projection"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<nav>
<div class="nav-wrapper">
<a href="#" class="brand-logo">Logo</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="sass.html">Sass</a></li>
<li><a href="badges.html">Components</a></li>
<li><a href="collapsible.html">JavaScript</a></li>
</ul>
</div>
</nav>
<nav view="breadcrumb"/>
<template>
<nav>
<div class="nav-wrapper">
<div class="col s12" each="v">
<a href="#!" class="breadcrumb">{{v}}</a>
</div>
</div>
</nav>
</template>
<script src="//unpkg.com/powjs"></script>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="//unpkg.com/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="//unpkg.com/materialize-css/dist/js/materialize.min.js"></script>
</body>
</html>
$(function(){
$('template').each(function(){
var elm=this.content.firstElementChild;
$('[view=breadcrumb]').replaceWith(
PowJS(elm)
.render(['First','Second','Third'])
.firstChild()
);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment