this.$element.siblings('[data-off-canvas-content]').css('transition-duration', '');
}
+ /**
+ * Fires when the off-canvas menu opens.
+ * @event OffCanvas#opened
+ */
this.$element.addClass('is-open').removeClass('is-closed');
- this.$triggers.attr('aria-expanded', 'true');
- this.$element.attr('aria-hidden', 'false');
-
+ this.$triggers.attr('aria-expanded', 'true');
+ this.$element.attr('aria-hidden', 'false')
+ .trigger('opened.zf.offcanvas');
this.$content.addClass('is-open-' + this.position);
plugin.$element.should.have.class('is-open');
$('body').should.have.class('is-off-canvas-open');
done();
- }, 1);
+ }, 30);
});
plugin.open();
plugin.toggle();
});
});
-
+
describe('keyboard events', function() {
it('closes Off Canvas on ESCAPE', function(done) {
$html = $(template).appendTo('body');