Skip to content

Instantly share code, notes, and snippets.

@jakewhiteley
Created July 21, 2015 21:07
Show Gist options
  • Save jakewhiteley/4417c4206d7be12fb462 to your computer and use it in GitHub Desktop.
Save jakewhiteley/4417c4206d7be12fb462 to your computer and use it in GitHub Desktop.
var AppPath = '/teimr/',
App = blocks.Application({
history: 'pushState'
});
App.View('Navigation', {
options: {
url: AppPath + 'views/navigation.html',
},
// populates the side nav with tags
sideNav: blocks.observable([1, 2, 3]),
ready: function() {
console.log('nav loaded')
}
});
App.View('Main', {
options: {
url: AppPath + 'views/main.html',
},
ready: function() {
console.log($('ul.tabs'), 'main loaded')
}
});
@jakewhiteley
Copy link
Author

Navigation.html:

<div class="row">
    <div class="col s12">
      <ul class="tabs">
        <li class="tab col s3"><a href="#test1">Test 1</a></li>
        <li class="tab col s3"><a class="active" href="#test2">Test 2</a></li>
        <li class="tab col s3 disabled"><a href="#test3">Disabled Tab</a></li>
        <li class="tab col s3"><a href="#test4">Test 4</a></li>
      </ul>
    </div>
    <div id="test1" class="col s12">Test 1</div>
    <div id="test2" class="col s12">Test 2</div>
    <div id="test3" class="col s12">Test 3</div>
    <div id="test4" class="col s12">Test 4</div>
  </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment