diff options
author | Kenton Hamaluik <kenton@hamaluik.com> | 2014-01-22 13:20:50 -0700 |
---|---|---|
committer | Kenton Hamaluik <kenton@hamaluik.com> | 2014-01-22 13:20:50 -0700 |
commit | abf580866624bfeec53d948894ba02fe4ee307fd (patch) | |
tree | 293847ec012f51ffb01cce3de0fd2a198f5943a5 /foundation-default-colours/static/js/foundation/foundation.offcanvas.js | |
parent | 6b057e4f9bb931e2db52c49a84bbe457f9f3910e (diff) | |
download | pelican-themes-abf580866624bfeec53d948894ba02fe4ee307fd.tar.gz |
Added Zurb Foundation 5.0.1 theme.
Diffstat (limited to 'foundation-default-colours/static/js/foundation/foundation.offcanvas.js')
-rw-r--r-- | foundation-default-colours/static/js/foundation/foundation.offcanvas.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/foundation-default-colours/static/js/foundation/foundation.offcanvas.js b/foundation-default-colours/static/js/foundation/foundation.offcanvas.js new file mode 100644 index 0000000..0ce07c0 --- /dev/null +++ b/foundation-default-colours/static/js/foundation/foundation.offcanvas.js @@ -0,0 +1,37 @@ +;(function ($, window, document, undefined) { + 'use strict'; + + Foundation.libs.offcanvas = { + name : 'offcanvas', + + version : '5.0.0', + + settings : {}, + + init : function (scope, method, options) { + this.events(); + }, + + events : function () { + $(this.scope).off('.offcanvas') + .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) { + e.preventDefault(); + $(this).closest('.off-canvas-wrap').toggleClass('move-right'); + }) + .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) { + e.preventDefault(); + $(".off-canvas-wrap").removeClass("move-right"); + }) + .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) { + e.preventDefault(); + $(this).closest(".off-canvas-wrap").toggleClass("move-left"); + }) + .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) { + e.preventDefault(); + $(".off-canvas-wrap").removeClass("move-left"); + }); + }, + + reflow : function () {} + }; +}(jQuery, this, this.document)); |