mirror of
https://github.com/AlekseyLobanov/AlekseyLobanov.github.io.git
synced 2026-01-12 13:12:03 +03:00
First commut
This commit is contained in:
37
theme/js/foundation/foundation.offcanvas.js
vendored
Normal file
37
theme/js/foundation/foundation.offcanvas.js
vendored
Normal file
@@ -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));
|
||||
Reference in New Issue
Block a user