Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit 9502c1a

Browse files
committed
Fix menu overlap that renders links behind it un-clickable
- Apply `height: 100%;` and `width: 100%` to `#dl-menu` only when open - Close #161
1 parent 94c03a6 commit 9502c1a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

_sass/_dl-menu.scss

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
========================================================================== */
44

55
.dl-menuwrapper {
6-
width: 100%;
7-
height: 100%;
86
position: absolute;
97
top: 0;
108
left: 0;
@@ -23,6 +21,11 @@
2321
left: 25px;
2422
}
2523

24+
&.dl-menuopen {
25+
width: 100%;
26+
height: 100%;
27+
}
28+
2629
button {
2730
top: 0;
2831
left: 0;

assets/js/plugins/jquery.dlmenu.js

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*
88
* Copyright 2013, Codrops
99
* http://www.codrops.com
10+
*
11+
* Modified by Michael Rose
1012
*/
1113
;( function( $, window, undefined ) {
1214

@@ -66,6 +68,7 @@
6668
},
6769
_config : function() {
6870
this.open = false;
71+
this.$menuwrapper = $( '#dl-menu' );
6972
this.$trigger = this.$el.children( '.dl-trigger' );
7073
this.$menu = this.$el.children( 'ul.dl-menu' );
7174
this.$menuitems = this.$menu.find( 'li:not(.dl-back)' );
@@ -178,6 +181,7 @@
178181
self._resetMenu();
179182
};
180183

184+
this.$menuwrapper.removeClass( 'dl-menuopen' );
181185
this.$menu.removeClass( 'dl-menuopen' );
182186
this.$menu.addClass( 'dl-menu-toggle' );
183187
this.$trigger.removeClass( 'dl-active' );
@@ -202,6 +206,7 @@
202206
$body.off( 'click' ).on( 'click.dlmenu', function() {
203207
self._closeMenu() ;
204208
} );
209+
this.$menuwrapper.addClass( 'dl-menuopen' );
205210
this.$menu.addClass( 'dl-menuopen dl-menu-toggle' ).on( this.transEndEventName, function() {
206211
$( this ).removeClass( 'dl-menu-toggle' );
207212
} );

0 commit comments

Comments
 (0)