Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
steelydylan committed Nov 17, 2016
1 parent cf0cecd commit 2615ae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/hiraku.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@
});
$(document).on('click', '.js-hiraku-offcanvas-btn', function(e) {
var $target = $($(this).data('toggle-offcanvas'));
var $close = $('<button type="button">Close Offcanvas-Menu Button</button>');
$close.attr('aria-label', 'Close')
.addClass('js-hiraku-offcanvas-close-btn');
$('<button type="button">Close Offcanvas-Menu Button</button>')
.attr('aria-label', 'Close')
.addClass('js-hiraku-offcanvas-close-btn')
.appendTo($target);
var $this = $(this);
var $body = $('body').css({ 'width': $(window).width(), 'height': $(window).height() });
var $sidebar = $target.find('.js-hiraku-offcanvas-sidebar');
$target.append($close);
var $first = $target.find(focusableElements).first();
var $last = $target.find(focusableElements).last();
$first.off('keydown.hiraku-offcanvas').on('keydown.hiraku-offcanvas', function(e) {
Expand Down
7 changes: 1 addition & 6 deletions src/hiraku.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2615ae5

Please sign in to comment.