2014-07-09 09:46:24 +09:00
|
|
|
Template[getTemplate('mobile_nav')].helpers({
|
2014-08-15 11:51:30 +09:00
|
|
|
primaryNav: function () {
|
|
|
|
return primaryNav;
|
|
|
|
},
|
|
|
|
secondaryNav: function () {
|
|
|
|
return secondaryNav;
|
2014-07-09 09:46:24 +09:00
|
|
|
},
|
2014-08-13 17:34:56 +09:00
|
|
|
getTemplate: function () {
|
2015-03-10 11:50:21 +09:00
|
|
|
return getTemplate(this.template);
|
2014-07-09 09:46:24 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-07-05 11:24:28 +09:00
|
|
|
Template[getTemplate('mobile_nav')].events({
|
2014-09-16 15:18:27 -04:00
|
|
|
'click .dropdown-sub-level': function () {
|
2012-12-05 11:05:05 +09:00
|
|
|
$('body').toggleClass('mobile-nav-open');
|
|
|
|
}
|
2014-07-10 11:45:34 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
Template[getTemplate('mobile_nav')].events({
|
2014-08-12 17:11:36 +09:00
|
|
|
'click .dropdown-top-level': function (e) {
|
2014-07-10 11:45:34 +09:00
|
|
|
e.preventDefault();
|
|
|
|
$(e.currentTarget).next().slideToggle('fast');
|
2014-08-12 17:11:36 +09:00
|
|
|
},
|
|
|
|
'click .mobile-nav a': function (e) {
|
|
|
|
if (e.target.className.indexOf('dropdown-top-level') == -1){
|
|
|
|
$('body').removeClass('mobile-nav-open');
|
|
|
|
}
|
2014-07-10 11:45:34 +09:00
|
|
|
}
|
2013-11-24 16:13:53 +02:00
|
|
|
});
|