Refactored the repository and gruntified all the things

This commit is contained in:
2014-05-17 23:16:16 +01:00
parent 0fa7bd127f
commit eb889620cc
94 changed files with 314 additions and 7905 deletions

View File

@@ -0,0 +1,57 @@
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.offcanvas = {
name : 'offcanvas',
version : '5.2.1',
settings : {},
init : function (scope, method, options) {
this.events();
},
events : function () {
var S = this.S;
S(this.scope).off('.offcanvas')
.on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
e.preventDefault();
S(this).closest('.off-canvas-wrap').toggleClass('move-right');
})
.on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
e.preventDefault();
S(".off-canvas-wrap").removeClass("move-right");
})
.on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
e.preventDefault();
var href = $(this).attr('href');
S('.off-canvas-wrap').on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
window.location = href
S('.off-canvas-wrap').off('transitionend webkitTransitionEnd oTransitionEnd');
});
S(".off-canvas-wrap").removeClass("move-right");
})
.on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
e.preventDefault();
S(this).closest(".off-canvas-wrap").toggleClass("move-left");
})
.on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
e.preventDefault();
S(".off-canvas-wrap").removeClass("move-left");
})
.on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
e.preventDefault();
var href = $(this).attr('href');
S('.off-canvas-wrap').on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
window.location = href
S('.off-canvas-wrap').off('transitionend webkitTransitionEnd oTransitionEnd');
});
S(".off-canvas-wrap").removeClass("move-left");
});
},
reflow : function () {}
};
}(jQuery, this, this.document));