// // goal: load in data, then template // var nav = $.sammy('#mainNav',function(){ this.use(Sammy.Mustache,'ms'); this.get('#/', function() { this.load('data/nav.json') .render('templates/nav.ms') // render will take the previous data as the `data` arg for rendering .swap(); }); });