These statements were automatically added by CoffeeScript. I'm only removing the obvious cases; there might be more cases where the `return` statement isn't necessary.
31 lines
807 B
JavaScript
31 lines
807 B
JavaScript
(function() {
|
|
"use strict";
|
|
App.FoundationExtras = {
|
|
clearSticky: function() {
|
|
if ($("[data-sticky]").length) {
|
|
$("[data-sticky]").foundation("destroy");
|
|
}
|
|
},
|
|
mobile_ui_init: function() {
|
|
$(window).trigger("load.zf.sticky");
|
|
},
|
|
desktop_ui_init: function() {
|
|
$(window).trigger("init.zf.sticky");
|
|
},
|
|
initialize: function() {
|
|
$(document).foundation();
|
|
$(window).trigger("resize");
|
|
$(document).on("page:before-unload", this.clearSticky);
|
|
window.addEventListener("popstate", this.clearSticky, false);
|
|
$(function() {
|
|
if ($(window).width() < 620) {
|
|
App.FoundationExtras.mobile_ui_init();
|
|
} else {
|
|
App.FoundationExtras.desktop_ui_init();
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
}).call(this);
|