soma.js
Version:
soma.js is a javascript framework created to build scalable and maintainable applications.
50 lines (42 loc) • 1.05 kB
HTML
<html>
<head>
<title>soma.js router</title>
<style>
.view {
display: none;
}
</style>
</head>
<body>
<nav>
<a href="#/home">Home</a>
<a href="#/page1">Page 1</a>
<a href="#/page2">Page 2</a>
</nav>
<div>
<div class="view home">
<h1>Home</h1>
</div>
<div class="view page1">
<h1>Page 1</h1>
</div>
<div class="view page2">
<h1>Page 2</h1>
</div>
</div>
<script src="../../build/soma.js"></script>
<script src="https://raw.github.com/flatiron/director/master/build/director.min.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36294101-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>