File size: 599 Bytes
cbc76af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | /* global define, $ */
define(['text!tmpl/home.html'], function (homeTmpl) {
'use strict';
var navigate;
function init(fn) {
// start getting data
navigate = fn;
}
function render(el) {
// got focus
el.html(homeTmpl);
bindListeners();
}
function destroy() {
// lost focus
}
function bindListeners() {
$('.za-screens').click(function () {
navigate($('.za-nav-screens'));
});
$('.za-maps').click(function () {
navigate($('.za-nav-maps'));
});
}
return {
init: init,
render: render,
destroy: destroy
};
});
|